I am trying to send an email with a plain text body and an alternate html body. However, when I snoop the data going over the network the text portion of the email is lost.
Here is a sample of my coding attempts.
private static MailMessage BuildEmail(string plainText, string htmlBody)
{
// Add the alternate body to the message.
ContentType HtmlContentType = new ContentType("text/html");
AlternateView alternate = AlternateView.CreateAlternateViewFromString(htmlBody, HtmlContentType);
ContentType PlainContentType = new ContentType("text/plain");
AlternateView PlainView = AlternateView.CreateAlternateViewFromString(plainText, PlainContentType);
MailMessage mail = new MailMessage(new MailAddress(ToEmail_DEFAULT),
new MailAddress(FromEmail_DEFAULT));
mail.Subject = "First plain. Html next";
mail.AlternateViews.Add(PlainView);
mail.AlternateViews.Add(alternate);
return mail;
}