Get error using CreateMHTMLBody to send email on Win2K server?

I tried to use CreateMHTMLBody method of CDO component in my Win 2K server. It works using HTMLBODY, Sending an HTML e-mail that sends a webpage from a file on your computer such as myMail.CreateMHTMLBody "file://d:/inetpub/store/Coupon.htm".

But when I set the myMail.CreateMHTMLBody to "http://www.cnn.com" I get the error "The server cannot locate the resource speicified"

Set myMail=CreateObject("CDO.Message")
myMail.Subject="My Friends"
myMail.From="webmaster@hotmail.com"
myMail.To=Email@hotmail.com
myMail.CreateMHTMLBody "http://www.cnn.com"
myMail.Send
set myMail=nothing

What is wrong??????
zhao790Asked:
Who is Participating?
 
alorentzCommented:
Try a specific page on the site, but it looks like should work. http://www.w3schools.com/asp/asp_send_email.asp 

I do see error here though myMail.To=Email@hotmail.com,  needs "Email@hotmail.com"
0
 
kevp75Commented:
you are going about it wrong

change:
myMail.CreateMHTMLBody "http://www.cnn.com"

to:
myMail.HTMLBody "http://www.cnn.com"



and all this will do is send http://www.cnn.com as a link to the recipient???
0
 
kevp75Commented:
my mistake....alorentz is correct

0
 
alorentzCommented:
@kevp75 - see example of method on link to w3schools...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.