CDONTS problem (attaching images)

P

Poppy

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 = "(e-mail address removed)"
myMail.To = "(e-mail address removed)"
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 ?
 
R

roger

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 = "(e-mail address removed)"
myMail.To = "(e-mail address removed)"
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.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top