Hello there!
I am sending the contents of a form to an email address using CDONTS. I want to send it with some formatting so I have to change the Body format oj ObjMail.body to HTML.
I have done all this but when I do send the mail, It comes through with all the HTML tags showing and no formatting is achieved.
Does anyone know whats up here?
Here is a bit of my code.
sBody = sBody & "<Strong>" & Request.form.key(icurrFieldIndex)": </Strong>" & Request.form.key(icurrFieldIndex)
Set objMail = CreateObject("CDONTS.Newmail")
sHTML = "<HTML>"
sHTML = sHTML & "<HEAD>"
sHTML = sHTML & "<TITLE>Bad News!</TITLE>"
sHTML = sHTML & "</HEAD>"
sHTML = sHTML & "<BODY>"
sHTML = sHTML & sbody
sHTML = sHTML & "</BODY></HTML>"
objMail.From = "rob@here.com"
objMail.To = "jdr@there.com"
objMail.BodyFormat = cdoBodyFormatHTML
objMail.Body = sHTML
objMail.Send
Set objMail = Nothing
KISS - Keep It Simple Sugar!
I am sending the contents of a form to an email address using CDONTS. I want to send it with some formatting so I have to change the Body format oj ObjMail.body to HTML.
I have done all this but when I do send the mail, It comes through with all the HTML tags showing and no formatting is achieved.
Does anyone know whats up here?
Here is a bit of my code.
sBody = sBody & "<Strong>" & Request.form.key(icurrFieldIndex)": </Strong>" & Request.form.key(icurrFieldIndex)
Set objMail = CreateObject("CDONTS.Newmail")
sHTML = "<HTML>"
sHTML = sHTML & "<HEAD>"
sHTML = sHTML & "<TITLE>Bad News!</TITLE>"
sHTML = sHTML & "</HEAD>"
sHTML = sHTML & "<BODY>"
sHTML = sHTML & sbody
sHTML = sHTML & "</BODY></HTML>"
objMail.From = "rob@here.com"
objMail.To = "jdr@there.com"
objMail.BodyFormat = cdoBodyFormatHTML
objMail.Body = sHTML
objMail.Send
Set objMail = Nothing
KISS - Keep It Simple Sugar!