Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Professional
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 3rd, 2005, 12:18 PM
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
  #2 (permalink)  
Old May 11th, 2005, 09:47 AM
Friend of Wrox
Points: 410, Level: 7
Points: 410, Level: 7 Points: 410, Level: 7 Points: 410, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2004
Location: New Delhi, India.
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anubhav.kumar
Default

Hi dear,

have you set ContentBase property instead of contentLocation?

Anubhav Kumar
Reply With Quote
  #3 (permalink)  
Old May 12th, 2005, 02:15 PM
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

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




Reply With Quote
  #4 (permalink)  
Old May 12th, 2005, 03:06 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

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
Reply With Quote
  #5 (permalink)  
Old May 19th, 2005, 12:06 PM
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

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

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
using CDONTS maunishq ASP.NET 1.0 and 1.1 Basics 1 August 23rd, 2007 09:35 AM
CDONTS sendmail stops working suddenly Cinderella Classic ASP Basics 1 March 9th, 2006 08:45 PM
cdonts p2ptolu Classic ASP Databases 1 March 8th, 2005 11:48 AM
CDONTS preeti Wrox Book Feedback 1 August 11th, 2004 09:39 AM
CDONTS asims12 Classic ASP Basics 1 November 13th, 2003 10:25 PM



All times are GMT -4. The time now is 11:39 PM.


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