Results 1 to 4 of 4

Thread: CDO problems

  1. #1

    Thread Starter
    Hyperactive Member thebloke's Avatar
    Join Date
    May 2003
    Posts
    358

    CDO problems

    Guys

    I have a problem with cdo on a win2k server. I need to use:

    objMail.CreateMHTMLBody

    but I get an error message:

    Object doesn't support this property or method: 'CreateMHTMLBody'

    This works on my dev machine (xp pro) but I guess CreateMHTMLBody is only available in CDO and not CDONTS.

    Is there an alternative?
    The Bloke
    www.blokeinthekitchen.com
    making cooking cool for blokes

  2. #2
    Fanatic Member kaihirst's Avatar
    Join Date
    Jul 2005
    Location
    The Resaurant At the End of The Universe
    Posts
    633

    Re: CDO problems

    Hi bloke.

    here you go..


    VB Code:
    1. dim CDOmailBody
    2. dim mailBody
    3.  
    4. set CDOmailBody = Server.CreateObject("CDONTS.NewMail")
    5. // rest of your 'code, you know the stuff...
    6. // the use...
    7. CDOmailbody.body = mailbody
    8. // obviously mailbody is your body of the mail no less!!!!!
    9. CDOmailBody.send
    10. set CDOmailBody = nothing

    Pretty much sums this one up

    hope this helps

    kai
    As the information I give is useful in its nature, consider using the RATE POST feature located on the bottom left of this post please..

    A few things that make a good Developer a Great One.
    Methodical and a thorough approach to research and design inevitably leads to success.
    Forward thinking is the key to Flow of control.
    Never test in the design environment, always test in real time, you get the REAL results.
    CBSE & OOSE are the same animal, they just require different techniques, and thinking.
    SEO is a globe of objectives, SE rankings is an end to a means for these objectives, not part of them.
    The key to good design is explicit attention to both detail and response.
    Think Freely out of the "Box" you're in..... You will soar to better heights.

    Kai Hirst - MSCE, MCDBA, MCSD, MCP, MCAP, MSCT


  3. #3

    Thread Starter
    Hyperactive Member thebloke's Avatar
    Join Date
    May 2003
    Posts
    358

    Re: CDO problems

    Yeah, this will mean that I have to string up the html email body, something like

    VB Code:
    1. mailbody = "<htm>"
    2. mailbody = mailbody & "<table>"
    etc, etc, blah blah blah.

    I don't want to do this. The reason I was using createMHTMLBody was so I could just reference a html (or asp) file:
    VB Code:
    1. cdomailbody.createmhtmlbody = "http://localhost/thisfile.asp"

    Is my only option the one Kai suggests?

    The Bloke
    www.blokeinthekitchen.com
    making cooking cool for blokes

  4. #4
    Fanatic Member kaihirst's Avatar
    Join Date
    Jul 2005
    Location
    The Resaurant At the End of The Universe
    Posts
    633

    Re: CDO problems

    Hi,

    for CDO it is yes im afraid, this is why CDOSYS outsourced CDO for New Technology Systems, because of lack of functionality.

    Fi naybodies got any other ideas, love to knwow..

    Kai
    As the information I give is useful in its nature, consider using the RATE POST feature located on the bottom left of this post please..

    A few things that make a good Developer a Great One.
    Methodical and a thorough approach to research and design inevitably leads to success.
    Forward thinking is the key to Flow of control.
    Never test in the design environment, always test in real time, you get the REAL results.
    CBSE & OOSE are the same animal, they just require different techniques, and thinking.
    SEO is a globe of objectives, SE rankings is an end to a means for these objectives, not part of them.
    The key to good design is explicit attention to both detail and response.
    Think Freely out of the "Box" you're in..... You will soar to better heights.

    Kai Hirst - MSCE, MCDBA, MCSD, MCP, MCAP, MSCT


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width