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

email attachment from asp 1

Status
Not open for further replies.

thegiraffe

Programmer
Mar 8, 2002
49
IE
I'm using an asp page to send out information to our clients from an sql database, this has been working for a while....

Now some wiseguy in the company says, surely we should be able to mass mail timesheets etc to our clients.

This on the other hand poses a bit of a problem, all the books i'm trying to use to read up on this are way to complex and just don't work with the way i've always done it (sorry wrox)

i'm declaring all my variables such as

object.to
object.from
object.subject
object.body

then finishing with object.send

i can assign variables to all the above easily (obviously), is there an easy way to set an attachment such as
attachment = "file"
object.attachment

The way i'm trying has completely bamboozled me.

Cheers and stuff

Giraffe!!!?!!??!!??!!?!
 
Hi Giraffe

you need this code big time!

Code:
object.AttachFile pathtofile, attachmentname

Where pathtofile is the path to the file you wish to attach and attachmentname is the name you wish to call the file on the attachment (you can rename the attachment to "pants_report.pdf" if you wish)

Then just object.send as normal

Have fun

Derren
[The only person in the world to like Word]
 
I am assuming from your code that you are using CDONTS ... Derren
[The only person in the world to like Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top