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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

file(s) attached with asp

Status
Not open for further replies.

eldhead

Technical User
Jan 26, 2004
2
SE
Im using aspsmartmail and this code:

Attachments.Add Server.MapPath("C:\files\file.zip")

attatches the file "file.zip" to a email.

Suppose I have lots of files in dir "files", and dont know their name and/or the physical path but still want them to be emailed to me?? Is it possible? Im using Aspmail component to send mails. Sorry to say but their support suck!
 
I have no experience with aspsmartmail but have you tried using wild cards *.* so it would look like this
Attachments.Add Server.MapPath("C:\files\*.*")

Careful. We don't want to learn from this. -- Calvin
 
I think the Server.MapPath is used when you want to translate a virtual path into a physical path. Have you just tried to pass in the physical path its self?

Attachments.Add "C:\Files\*.*"

Here's a link to a page on Server.MapPath

Careful. We don't want to learn from this. -- Calvin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top