1
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?

OrElse
  • 9,709
  • 39
  • 140
  • 253

4 Answers4

1

Easy:

objMail.IsBodyHtml = True
Mehrdad Afshari
  • 414,610
  • 91
  • 852
  • 789
1

Have a look at MailMessage.IsBodyHtml

Philip Fourie
  • 111,587
  • 10
  • 63
  • 83
0

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

Brian Henk
  • 623
  • 1
  • 6
  • 14
0

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

objMail.BodyFormat = System.Web.Mail.MailFormat.Html;
Robban
  • 6,729
  • 2
  • 39
  • 47