Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2003
    Posts
    18

    Unanswered: 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

  2. #2
    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

  3. #3
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •