Get ready for BLACK FRIDAY shopping starting in

Forums

ASP

This topic is locked

send email where CreateMHTMLBody is an asp Problem

Posted 22 Jun 2007 10:56:16
1
has voted
22 Jun 2007 10:56:16 Didier Glorieux posted:
hi guys, I searched for hours and hours for a solution for my problem....nothing found <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>

What I do is trying to send a email in an asp page and the content is an asp page with records.
I have two pages.
page one has this code insite the rest of the code :
Set myMail=CreateObject("CDO.Message"
myMail.Subject="test"
myMail.From="fromemail"
myMail.To="myaddress"
myMail.CreateMHTMLBody "file://C:/test2.asp"
myMail.Send
set myMail=nothing

the test2.asp page has only pure html code (for testing this funtion)
when I try to load the page to send this I get an error :

The content type was not valid in this context. For example, the root of a MIME Encapsulation of Aggregate HTML Documents (MHTML) message must be an HTML document.

strange thing,
If I change my test2.asp page to test2.htm, I do not change one character of the code.
then I can send it???

My smtp is working because normaly I send large mails with large db data as mymail = mymail &" test =" & variable blablba
without any problem

so maybe some do know what is going wrong.
I have a server 2003 and IIS 6,

I really hope some can help me out.

with regards
Didier

Reply to this topic