View Single Post
  #1 (permalink)  
Old May 3rd, 2005, 12:18 PM
srotondo srotondo is offline
Authorized User
Points: 373, Level: 6
Points: 373, Level: 6 Points: 373, Level: 6 Points: 373, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2004
Location: , , .
Posts: 68
Thanks: 1
Thanked 0 Times in 0 Posts
Default 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



Reply With Quote