asp_cdo thread: RE: CDONTS object question.
> I agree, but that isn't an option. Gary, looks like you are certified in
> Goldmine. Do you have any other helpful hints? Am I able to set the
> Content-Type using the CDONTS object?
The following work-around worked for me.
Somewhere I found that cdonts has a problem that more than one line can be
added to a particular header field. I used this flaw to set the
content-type using the "subject" field.
See the code below:
function sendMail2(strEmailAddress, strFrom, strSubject, strMsg)
ContentType = "multipart/alternative;" & vbcrlf &
set objMsg = Server.CreateObject("CDONTS.NewMail")
objMsg.From = strFrom
objMsg.To = strEmailAddress
objMsg.Subject = strSubject & vbcrlf & "Content-Type: " &
objMsg.BodyFormat = 0 '0 = html format, 1 = text format
objMsg.MailFormat = 1 '0 = mime format, 1 = plain text format
objMsg.Body = strMsg
sendmail2 = TRUE