Question

Dim objMail As New Mail.MailMessage("no-reply@mywebsite.com", 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?

Was it helpful?

Solution

Have a look at MailMessage.IsBodyHtml

OTHER TIPS

Easy:

objMail.IsBodyHtml = True

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

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

objMail.BodyFormat = System.Web.Mail.MailFormat.Html;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top