469,323 Members | 1,641 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,323 developers. It's quick & easy.

Pictures in asp generated e-mails

hi again,
now I want to send a picture in my e-mails that are send using asp code

first I create the mail Object: Set objMail =
Server.CreateObject("CDONTS.NewMail")

After I fill a variable with the html code that will be the mail

txtMailBody = "<html>"
txtMailBody = txtMailBody & "<center>Hi <BR> This is a test"

txtMailBody = txtMailBody & "<center><img src='CommAd.jpg'>"

finally I send the mail using the following code:
objMail.Body = txtMailBody
objMail.Send

----------------------------------------------------------------

The problem is that the picture does not show on the users screens
should I send the picutre as attachement to?? if yes how could this be
done..?

or is there is specific code to use???

Please note that I could have used:
txtMailBody = txtMailBody & "<center><img
src='http://mydomain.com/pics/CommAd.jpg'>"
I tried it and it worked fine... but I don't want this method. All I want is
to simply let the picture shows without "hosting" it somewhere on the web!!!

thanks


Jul 19 '05 #1
2 1142
> txtMailBody = txtMailBody & "<center><img src='CommAd.jpg'>"

You need to put your domain in the img src.... once it's on the client's
computer, it thinks it's a local image - and therefore not working.

RR
Jul 19 '05 #2
> Please note that I could have used:
txtMailBody = txtMailBody & "<center><img
src='http://mydomain.com/pics/CommAd.jpg'>"
I tried it and it worked fine... but I don't want this method. All I want is to simply let the picture shows without "hosting" it somewhere on the

web!!!

I just read this part of your original post - so forget what I just posted.
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Raymond Dunton | last post: by
1 post views Thread by Jaak | last post: by
8 posts views Thread by cbmeeks | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Gurmeet2796 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.