문제

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?

도움이 되었습니까?

해결책

Have a look at MailMessage.IsBodyHtml

다른 팁

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;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top