How to send emails with the body of the message formatted in HTML.
<%
Dim objMail
Set objMail = CreateObject("CDONTS.NewMail")
objMail.AttachURL "IMAGES_PATH\logo.gif", "logo.gif"
'html mail
HTML = "<html>"
HTML = HTML & "<head>"
HTML = HTML & "<title>MAIL TITLE</title>"
HTML = HTML & "</head>"
HTML = HTML & "<body bgcolor=""#FFFFFF"">"
HTML = HTML & "<p><font face=""Verdana""><strong>"
HTML = HTML & "<img src=logo.gif><br>"
HTML = HTML & "<a href=http://www.morpheusweb.it>"
HTML = HTML & "Morpheusweb.it - Webmaster resources</a>"
HTML = HTML & "</strong></font></p>"
HTML = HTML & "<p>Insert here mail body..."
HTML = HTML & "</body>"
HTML = HTML & "</html>"
objMail.From = "SENDER"
objMail.To = "ADRESSEE"
objMail.Subject = "OBJECT"
objMail.BodyFormat = 0
objMail.MailFormat = 0
objMail.Body = HTML
objMail.Send
%>
Note:
with
objMail.BodyFormat = 0 ' if = a 1 text format
objMail.MailFormat = 0 ' if = a 1 text format
we send a text only email