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 > Problem with CDONTS attachments - please help!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-06-04, 12:06
cboath cboath is offline
Registered User
 
Join Date: Feb 2004
Posts: 2
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 "http://www.myserver.com/dir/file.zip"

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

All the info i've seen uses locations like "D:\directory\file.zip" 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 ours...it'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.

Thanks

cb
Reply With Quote
  #2 (permalink)  
Old 02-06-04, 12:57
cboath cboath is offline
Registered User
 
Join Date: Feb 2004
Posts: 2
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/chief1.zip")

MyMail2.AttachFile strFilePath, "chiefy1.zip"

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

Hopefully it'll help someone.
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