Sending email as html

251 views Asked by At
Dim objMail As New Mail.MailMessage("[email protected]", ToEmail, "Password Reset", body)

...and the problem is that the message is sent as pure text including the <br> tags within the body

How could i send the email as html?

4

There are 4 answers

0
Philip Fourie On BEST ANSWER

Have a look at MailMessage.IsBodyHtml

0
Brian Henk On

I'm not sure how to do this in VB, but you need to set the mime-type to text/html

0
Mehrdad Afshari On

Easy:

objMail.IsBodyHtml = True
1
Robban On

You need to specify that the mailbody is to be sent as HTML... like this:

objMail.BodyFormat = System.Web.Mail.MailFormat.Html;