Solved

ATTACH URL for file actaully on web not on local HDD

Posted on 2002-05-20
5
280 Views
Last Modified: 2012-05-04
Hi, I am using the following code

     dim xs
     xs = """" & "http://www.myURL.com/prodimg/" & rstProduct.fields.getValue("Image") & """"    
     Set myMail = CreateObject("CDONTS.NewMail")
     myMail.AttachURL xs , rstProduct.fields.getValue("Image")
     myMail.bodyFormat = 0
     myMail.mailFormat = 0
     myMail.From = "here@there.com"
     myMail.To = "craig@anyway.com"
     myMail.Subject = "TESTING"
     myMail.Body = HTML
     myMail.Send
     Set myMail = Nothing

I have the following code in the HTML build up

HTML = HTML & "<td width=304><img border=1 src=" & """" & rstProduct.fields.getValue("Image") & """" & " width=300 height=300></td>"

I am trying to get the image to be embeded into the mail so that it can viewed by the recipient without them having to be online, I keep getting a page cannot be displayed error from the server.... any ideas...

BTW what do I have to do to my local machine running PWS to be able to test this code, or does it need to run on an NT server for the CDONTS function to work, its a real pain having to upload the files to my ISP to test it.

Regards

Craig
0
Comment
Question by:publicityhouse
  • 2
5 Comments
 
LVL 5

Accepted Solution

by:
russellshome earned 100 total points
ID: 7021102
The recipient must be online in order to collect the email so your requirement "viewed by the recipient without them having to be online" seems nonsensical.

If the recipient has collected the email (online) and the image is specified using a fully qualified URL, the image will be cached so that recipient can view it offline anyway. You do not need to embed it.
0
 

Author Comment

by:publicityhouse
ID: 7021110
OK, so it may view again without going online, im gonna try the caching thing anyway :)
0
 
LVL 15

Expert Comment

by:gladxml
ID: 8836515
No comment has been added lately and it seems that this question have been abandoned. So it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question or invite a Moderator to close this question if there's no reply from you after seven days.

In the absence of responses, I will recommend the following:

To accept the comment and points awarded to russellshome

** PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER **


Just trying to help for the cleanup...
gladxml
0
 
LVL 5

Expert Comment

by:russellshome
ID: 8859379
Good recommendation c|:-)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question