How to work with Alternate view in Mail.dll

0 votes

Hi there,

Right now i'm building a converter which converts an instance of System.Net.Mail.MailMessage to an instance of LimiLabs.Mail.IMail.

Things are going great so far, but now i'm stuck because i don't know how AlternateView works in LimiLabs Mail.dll

Here is what is have so far:

foreach (System.Net.Mail.AlternateView alternateView in m.AlternateViews)
   MimeAlternative alternative = new MimeFactory().CreateMimeAlternative();

   //builder is a LimiLabds MailBuilder instance

I hope someone can help me out.
Kind regards,

asked Nov 22, 2018 by Erik

1 Answer

0 votes
Best answer

You can use Limilabs.Mail.Tools.NetMailMessageConverter class - it converts System.Net.Mail.MailMessage into Limilabs.Mail.MailBuilder.

IMail.Alternatives are root message views that are not text/plain (IMail.TextData) or text/html (IMail.HtmlData) or text/rtf (IMail.RtfData).

For example MimeCalendar if message is an appointment.

answered Nov 22, 2018 by Limilabs support (227,990 points)