Having an issue sending an image via email as an embedded image in the body. The image file shows as an attachment which is ok but the inline image portion just shows as a r
The other solution is attaching the image as attachment and then referencing it html code using cid. HTML Code:
C# Code:
EmailMessage email = new EmailMessage(service);
email.Subject = "Email with Image";
email.Body = new MessageBody(BodyType.HTML, html);
email.ToRecipients.Add("abc@xyz.com");
string file = @"C:\Users\acv\Pictures\Logo.jpg";
email.Attachments.AddFileAttachment("Logo.jpg", file);
email.Attachments[0].IsInline = true;
email.Attachments[0].ContentId = "Logo.jpg";
email.SendAndSaveCopy();