Send HTML email asp

asp-classic, email, vbscript

Solution

According to this page you need to set the IsHTML flag to true.

strHTML = "Hello world"

Mail.IsHTML = True
Mail.Body = "<HTML><BODY><CENTER>" & strHTML & "</CENTER></BODY></HTML>"

Problem

I want to add some html in an email. I've tried the following. ``` vFromName = "someone" vFromAddress = "someemail" vTo = "recipient" vSubject="someSubject" vBodyofemail = "<html><table><tr><td><b>SomeText</b></td></tr></table></html>" Call SendMail() sub SendMail() 'change to address of your own SMTP server strHost = "mail.internal.rouses.com" Set Mail = Server.CreateObject("Persits.MailSender") 'enter valid SMTP host Mail.Host = strHost 'From eMail address Mail.FromName = vFromName 'From address Mail.From = vFromAddress 'To eMail address Mail.AddAddress vTo 'message subject Mail.Subject = vSubject 'message body Mail.Body = vBodyOfEmail Mail.Send end sub ``` How can i do this? I've tried Mail.HtmlBody but that doesn't work either. The email is sent but all i see are the tags where the html is.

Original source