I am using MailKit/MimeKit 1.2.7 (latest NuGet version).
I tried to embed an image in the HTML body of my email by following the sample from the API documentation (section "Using a BodyBuilder").
My current code looks like this:
var builder = new BodyBuilder();
builder.HtmlBody = @"<p>Hey!</p><img src=""Image.png"">";
var pathImage = Path.Combine(Misc.GetPathOfExecutingAssembly(), "Image.png");
builder.LinkedResources.Add(pathLogoFile);
message.Body = builder.ToMessageBody();
I can send this email and in fact the image is attached to the email. But it is not embedded.
Am I missing something? Or is this Apple Mail's fault (this is the email client I am using for receiving emails)?
I am grateful for any idea (and thanks so much to Jeffrey Stedfast for providing such a great toolset!!).
Ingmar