Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASPEmail Attachment Path problem

Status
Not open for further replies.

Pandyon

Programmer
Feb 21, 2001
38
0
0
US
I'm trying to program a page to grab a file from my website, attach it and send the email. The problem is it's a hosted site. Does the ASPEmail Attachment method need a hard-coded path like "F:/document/Doc1.doc"? or can I use "//website/document/doc1.doc"...I'm at a loss at the moment.

Everything else works, it's just the attachment isn't working, I get a path not found error.

Thanks,


Mark
 
Found the answer to my own problem next day.

To get the path right, I had to add the following.

strPath = Server.MapPath(".")

then

Mail.AddAttachment strPath & "\file1.doc"

That did it.

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top