0 votes

Hello, I'm starting to use mail-dll in c# to download mail and have a question:

How can I get the incrusted images in the email?

by

1 Answer

0 votes

Do you mean embedded images?

Use IMail.Visuals collection, it contains visual elements, files that should be displayed to the user, such as images embedded in an HTML email:

foreach (MimeData mime in email.Visuals)
{
    // you can access raw data:
    byte[] data = mime.Data;

    // -or- save directly to file:
    mime.Save(@"c:\" + mime.SafeFileName);
}

You can find more info here:
https://www.limilabs.com/blog/save-images-embedded-in-html-email-to-disk-using-imap

by (297k points)
...