Get error using CreateMHTMLBody to send email on Win2K server?

Posted on 2006-06-07
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 "" I get the error "The server cannot locate the resource speicified"

Set myMail=CreateObject("CDO.Message")
myMail.Subject="My Friends"
myMail.CreateMHTMLBody ""
set myMail=nothing

What is wrong??????
Question by:zhao790
    LVL 31

    Accepted Solution

    Try a specific page on the site, but it looks like should work.

    I do see error here though,  needs ""
    LVL 25

    Expert Comment

    you are going about it wrong

    myMail.CreateMHTMLBody ""

    myMail.HTMLBody ""

    and all this will do is send as a link to the recipient???
    LVL 25

    Expert Comment

    my mistake....alorentz is correct

    LVL 31

    Expert Comment

    @kevp75 - see example of method on link to w3schools...

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
    I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now