I am trying to send an email message in HTML Format. I have a richtextbox the the user can change the color and font in the message. Below is the code I am using which ends up send in Text Format. Most codes I have found use System.WebMail which in vb 2008 is obsolete. This snippet is using System.Net.Mail namespace.
Public Shared Function SendEmailMessage(ByVal sendTo As String, _
ByVal sendFrom As String, _
ByVal sendSubject As String, _
ByVal sendMessage As String, _
Optional ByVal toBcc As ArrayList = Nothing, _
Optional ByVal attachments As ArrayList = Nothing) As String
Dim message As New MailMessage()
With message
.From = New MailAddress(sendFrom)
.To.Add(sendTo)
.Subject = sendSubject
.IsBodyHtml = True
.Body = sendMessage
End With
Thanks
Charles