p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Professional (http://p2p.wrox.com/forumdisplay.php?f=63)
-   -   CDONTS: contentLocation--trouble working (http://p2p.wrox.com/showthread.php?t=28880)

srotondo May 3rd, 2005 12:18 PM

CDONTS: contentLocation--trouble working
 
Good afternoon.

I've written a web-based e-mail system that's working fine.

What i would like to do now is add images to my e-mails.

here's the code that i use to embed images in my e-mail: <img height="399" alt="" src="../ewebeditpro4/upload/joebwrco.jpg" width="600" border="0" />

I'm trying to use content location to specify the base url for the image file: objEmail.ContentLocation = "http://www.cshgreenwich.org".

However, this is not working. Any idea as to what i'm doing wrong?

thanks for your help.

btw, the only time that an image is successfully displayed in an e-mail is when i hard-code the entire url, like this: <img height="399" alt="" src="http://www.cshgreenwich.org/ewebeditpro4/upload/joebwrco.jpg" width="600" border="0" />


================================================== ==================

here's the asp code that i use to send the e-mail:

set objEmail = server.CreateObject("CDONTS.NewMail")

objEmail.To = session("sesEmailTo")
objEmail.From = session("sesEmailFrom")
objEmail.CC = session("sesEmailCC")
objEmail.BCC = session("sesEmailBCC")
objEmail.value("Reply-To") = session("sesEmailReply")
objEmail.Subject = session("sesEmailSubject")


strHTMLemailBody = "<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN"">" & NL
strHTMLemailBody = strHTMLemailBody & "<html>"
strHTMLemailBody = strHTMLemailBody & "<head>"
strHTMLemailBody = strHTMLemailBody & "<meta http-equiv=""Content-Type"""
strHTMLemailBody = strHTMLemailBody & "content=""text/html; charset=iso-8859-1"">"
strHTMLemailBody = strHTMLemailBody & "<title>Convent of the Sacred Heart</title>"
strHTMLemailBody = strHTMLemailBody & "</head>"
strHTMLemailBody = strHTMLemailBody & "<body>"
strHTMLemailBody = strHTMLemailBody & session("sesEmailBody")
strHTMLemailBody = strHTMLemailBody & "</body>"
strHTMLemailBody = strHTMLemailBody & "</html>"

objEmail.Body = strHTMLemailBody
objEmail.BodyFormat = 0
objEmail.MailFormat = 0
objEmail.ContentLocation = "http://www.cshgreenwich.org"

objEmail.send
set objEmail = nothing




anubhav.kumar May 11th, 2005 09:47 AM

Hi dear,

have you set ContentBase property instead of contentLocation?

Anubhav Kumar

srotondo May 12th, 2005 02:15 PM

thanks for checking my posting.

yes. i've tried just objEmail.ContentLocation = "http://www.cshgreenwich.org", just objEmail.ContentBase = "http://www.cshgreenwich.org" and finally both, but none seem to work.

any thoughts?

thank you.

sal





happygv May 12th, 2005 03:06 PM

Sal,

It works. I am able to see the guy's pic coming through, I just copy/pasted your code and that seems working fine. It also works with "ContentBase".

What is that you see?

_________________________
- Vijay G
Strive for Perfection

srotondo May 19th, 2005 12:06 PM

that's great news.

yes, if you use this code it will work: <img height="399" alt="" src="http://www.cshgreenwich.org/ewebeditpro4/upload/joebwrco.jpg" width="600" border="0" />

since the url is hard-coded and absolute.

however, were you able to get it to work w/ the relative url?

please send me the e-mail: srotondo@hotmail.com

thank you.

sal



All times are GMT -4. The time now is 10:57 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.