foens / hpop

OpenPOP.NET code repository
http://hpop.sourceforge.net/
202 stars 114 forks source link

OpenPop.Mime.Message.ToMailMessage() - Wrong HTML-Body conversion #73

Open sdesdfsdf opened 6 years ago

sdesdfsdf commented 6 years ago

The ContentType of the System.Net.Mail.MailMessage.Body content is always "text/plain". https://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage.body(v=vs.100).aspx

Bug No.1: In OpenPop.Mime.Message.ToMailMessage() HTML-Bodys are copied into System.Net.Mail.MailMessage.Body

Bug No.2: In OpenPop.Mime.Message.ToMailMessage() the HTML-Bodys is not copied into the AlternateViews. So when System.Net.Mail.MailMessage.IsBodyHtml is set true a email-client like Outlook can't find the html-part and shows the wrong formated "text/plain" Body.

current.txt fixed.txt

StefanLundmark commented 4 years ago

Ran into this as well, and the fix seems to be working - thanks!