Windows Script to send SMTP HTML Message body

Discussion in 'Scripting' started by Ron Thompson, Aug 13, 2003.

  1. Ron Thompson

    Ron Thompson Guest

    Hi, I have written a script to send SMTP messages based on
    examples here and in script center, however I need to
    figure out how to send an HTML body

    any ideas?

    thanks,
     
    Ron Thompson, Aug 13, 2003
    #1
    1. Advertisements

  2. Ron Thompson

    Yoann Roman Guest

    Hi, I have written a script to send SMTP messages based on
    When using CDO on Windows 2000:

    Set objMsg = CreateObject("CDO.Message")
    ' ... the rest of your code ...
    objMsg.HTMLBody = "<your html goes here>"
    objMsg.Send

    When using CDONTS on Windows NT/2000:

    Set objMsg = CreateObject("CDONTS.NewMail")
    ' ... the rest of your code ...
    objMsg.BodyFormat = 0
    objMsg.MailFormat = 0
    objMsg.Body = "<your html goes here>"
    objMsg.Send
     
    Yoann Roman, Aug 14, 2003
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.