Sets the preamble text for a mime formatted email message.
Alternate text will read by those mail readers that do not support mime formatted messages. When AltText is set, the EmailMessage will automatically add the "multipart/alternative" header to the mail message, according to Mime 1.0 standards.
[C#]
EmailMessage msg = new EmailMessage( "mail.MyCompany.com" );
msg.FromAddress = "me@MyCompany.com";
msg.To = "you@YourCompany.com";
msg.Subject = "Daily Newsletter";
//read by those readers that support html
msg.HtmlBodyPart = "<h3>Here is our daily newsletter.....</h3>";
//this test will be read by those clients that do not support html
msg.TextBodyPart = "since your mail client does not support fancy HTML, here is the text version.";
msg.AltText = "This is a multipart message in mime format.";
msg.Send();
[Visual Basic]
Dim msg As New EmailMessage("mail.MyCompany.com")
msg.FromAddress = "me@aspNetEmail.com"
msg.To = "you@aspNetEmail.com"
msg.Subject = "Hi There!"
//read by those readers that support html
msg.HtmlBodyPart = "<h3>Here is our daily newsletter.....</h3>"
//this test will be read by those clients that do not support html
msg.TextBodyPart = "since your mail client does not support fancy HTML, here is the text version."
msg.AltText = "This is a multipart message in mime format."
msg.Send()