Here is a usage example:
I am making an application that will send HTML email newsletters. The application will also send an electronic version of the newsletter as an alternative submission. As I see it, there are two ways to get around this using the system.net.mail namespace. What are the advantages / disadvantages of these two methods, or is there another way that I am missing? Thank.
Dim m As New MailMessage
' One alternate view'
m.IsBodyHtml = True
m.Body = HTMLString
m.AlternateViews.Add(AlternateView.CreateAlternateViewFromString(plaintextstring), Nothing, "text/plain")
' OR two alternate views without specifying the body '
m.AlternateViews.Add(AlternateView.CreateAlternateViewFromString(plaintextstring), Nothing, "text/plain")
m.AlternateViews.Add(AlternateView.CreateAlternateViewFromString(HTMLstring), Nothing, "text/html")
source
share