0

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")
mail.To.Add("xxx@cox.net")
'set the content
mail.Subject = "Article to be submitted."
mail.Body = Message
mail.Attachments.Add(Attach)
'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")
smtp.Send(mail)
End Sub
]

Any help will be appreciated.

2
Contributors
2
Replies
4
Views
7 Years
Discussion Span
Last Post by jonniebl
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.