?
Solved

Get error using CreateMHTMLBody to send email on Win2K server?

Posted on 2006-06-07
6
Medium Priority
?
327 Views
Last Modified: 2012-05-05
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??????
0
Comment
Question by:zhao790
  • 2
  • 2
4 Comments
 
LVL 31

Accepted Solution

by:
alorentz earned 420 total points
ID: 16853813
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
 
LVL 25

Expert Comment

by:kevp75
ID: 16855442
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
 
LVL 25

Expert Comment

by:kevp75
ID: 16855497
my mistake....alorentz is correct

0
 
LVL 31

Expert Comment

by:alorentz
ID: 16855502
@kevp75 - see example of method on link to w3schools...
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Screencast - Getting to Know the Pipeline
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month13 days, 11 hours left to enroll

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question