+1 vote

Hi Support,

While sending email with html text with embed images, the received emails shows attachments with noname as text. Does limilabs dlls have any fix for this.


1 Answer

0 votes
Best answer

I'm not sure how you create your emails, you should be using AddVisual method:

    MailBuilder builder = new MailBuilder();
    builder.From.Add(new MailBox("alice@mail.com", "Alice"));
    builder.To.Add(new MailBox("bob@mail.com", "Bob"));
    builder.Subject = "This is HTML test";

    builder.Html =                            
        "This is <strong>HTML</strong> message, " +
        "with embeddedimage:<br />" +
        "<img src = 'cid:image1' />.";

    MimeData image = builder.AddVisual(@"c:\image.jpg");
    image.ContentId = "image1";
    image.FileName = "image1.jpg";

    IMail email = builder.Create();

You can specify the file name for any MIME entity by using FileName property. By default filename used to load that is used.

by (298k points)