CDONTS problem (attaching images)

Discussion in 'ASP General' started by Poppy, Apr 21, 2004.

  1. Poppy

    Poppy Guest

    I am sending an html email using the following code :


    code:-----------------------------------------------------------------------
    -------
    dim myMail
    set myMail = Server.CreateObject("CDONTS.NewMail")
    ImagePath = Server.MapPath("images\mailer")
    ImagePath = ImagePath & "\"
    'myMail.AttachURL
    "C:\inetpub\wwwroot\ambient\images\mailer\mailer_r1_c1.gif",
    "mailer_r1_c1.gif"
    myMail.AttachURL ImagePath & "mailer_r1_c1.gif", "mailer_r1_c1.gif"
    myMail.AttachURL ImagePath & "mailer_r2_c1.jpg", "mailer_r2_c1.jpg"
    myMail.AttachURL ImagePath & "mailer_r3_c1.gif", "mailer_r3_c1.gif"
    myMail.AttachURL ImagePath & "mailer_r5_c1.gif", "mailer_r5_c1.gif"
    myMail.From = ""
    myMail.To = ""
    myMail.Subject = "Testing Email"
    myMail.body = a
    myMail.BodyFormat = 0
    myMail.MailFormat = 0
    myMail.Send
    set myMail = nothing
    ----------------------------------------------------------------------------
    --

    The email is sent with the images attached but the images do not appear in
    the body.

    Any ideas ?
    Poppy, Apr 21, 2004
    #1
    1. Advertising

  2. Poppy

    roger Guest

    "Poppy" wrote

    > The email is sent with the images attached but the images do not appear in
    > the body.


    Does this work?

    dim myMail
    set myMail = Server.CreateObject("CDONTS.NewMail")
    myMail.From = ""
    myMail.To = ""
    myMail.Subject = "Testing Email"
    myMail.body = a
    myMail.BodyFormat = 0
    myMail.MailFormat = 0
    myMail.Send
    set myMail = nothing

    I assume the variable "a" contains a lot of HTML with
    <img> tags pointing to the various pictures.

    Of course, it won't work for users who don't accept
    such email.


    --
    roger
    roger, Apr 21, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QWxleCBCcm93bg==?=

    Problem attaching Custom SiteMapProvider that is not Static

    =?Utf-8?B?QWxleCBCcm93bg==?=, Oct 26, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    664
    =?Utf-8?B?QWxleCBCcm93bg==?=
    Oct 26, 2006
  2. Pav
    Replies:
    1
    Views:
    506
    Mark Rae
    Feb 8, 2007
  3. Yan

    CDONTS HTML mails with images

    Yan, May 5, 2004, in forum: ASP General
    Replies:
    2
    Views:
    94
  4. Scott McNair

    CDO/CDONTS and Images

    Scott McNair, Dec 23, 2004, in forum: ASP General
    Replies:
    3
    Views:
    113
    Scott McNair
    Jan 3, 2005
  5. Andrew Taranov

    Problem attaching script debugger to ASP under IIS6

    Andrew Taranov, Jun 23, 2005, in forum: ASP General
    Replies:
    2
    Views:
    179
    [MSFT]
    Jun 24, 2005
Loading...

Share This Page