I am writing a program that sends an email with attachments. I need to send it as HTML but I can not find any reference as to how to do this. My code follows:

Private Sub sendMail(ByRef Message)
Dim Attach As Attachment
Attach = New Attachment("c:\Project\Articles1\Article.txt")
'create the mail message
Dim mail As New MailMessage()
'set the addresses
mail.From = New MailAddress("xxx@cox.net")
'set the content
mail.Subject = "Article to be submitted."
mail.Body = Message
'send the message
Dim smtp As New SmtpClient("smtp.east.cox.net")
smtp.Port = 25
smtp.EnableSsl = True
smtp.Credentials = New System.Net.NetworkCredential("xxx", "xxx")
End Sub

Any help will be appreciated.

Re: HTML email message 80 80
Member Avatar


Re: HTML email message 80 80

Thanks, worked great.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.