Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004

    Unanswered: Problem with CDONTS attachments - please help!

    Here's the situation. Our ISP uses CDONTS, and since they host our site we're going to use CDONTS.

    I set up a complete script and it works fine.

    I then decided to use the AttachFile option to let user's select a few brochures to email to them.

    Well, the script still executes fine, it's just that no attachments are made to the email. Just the normal text that is added in the MyMail.Body line.

    The line as i used it was:

    MyMail.AttachFile ""

    I tried many variations, with and without parentheses, using all three options, as in AttachFile "http://www.mysever/dir/", "", 1 etc. Nothing works.

    All the info i've seen uses locations like "D:\directory\" instead of an Http address. So, can you use http address in the AttachFile line? I've not seen anything that says you can't. I can't get a location resolved to a drive letter because the server isn't's our ISP's. Is it possible that the AttachFile option needs to be enabled by the ISP? Or is it simple available by installing CDONTS on their server?

    Any info as to why this isn't working and what i may have to do to get it to work would be greatly appreciated.



  2. #2
    Join Date
    Feb 2004
    I finally got it to work, though why it works is a mystery to me.

    First i moved the files to attach to a files subdirectory and then used the following lines

    strFilePath = Server.MapPath("files/")

    MyMail2.AttachFile strFilePath, ""

    For whatever reason, that worked whereas the above didn't.

    Hopefully it'll help someone.

Posting Permissions

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