If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Include file in email

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-13-03, 05:36
rahulqa rahulqa is offline
Registered User
 
Join Date: Feb 2003
Posts: 18
Include file in email

I am using cdonts for sending email from asp page. I want to include the contents of one file in the email not as attachment.
i.e. suppose if file a.asp contains some images and some information and it is on the server. I want to include this file in the body email.

Is this possible? If yes how?

Thanks
Rahul
Reply With Quote
  #2 (permalink)  
Old 03-13-03, 11:07
Memnoch1207 Memnoch1207 is offline
Registered User
 
Join Date: Jan 2003
Location: Midwest
Posts: 138
set fs = Server.CreateObject("Scripting.FileSystemObject")

Set textStreamObject = fs.OpenTextFile(path to the file,1,false,0)
strBody = textStreamObject.ReadAll

SendMail To, From , Subject, strBody
Reply With Quote
  #3 (permalink)  
Old 03-14-03, 05:31
rahulqa rahulqa is offline
Registered User
 
Join Date: Feb 2003
Posts: 18
Yes this worked but for images in the included file i had to write the full path like http://www.mysite.com/img/myimage.gif.

Writing only img/myimage.gif didn't worked.

Thanks for quick response.
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On