The CDONTS mail object can be used to send email attachments - it contains a method named AttachFile. The file you wish to attach must exist on the Web server (or be accessible on a remote machine by the IUSR_MachineName account) and the IUSR_MachineName must have Read permission on the file you wish to attach. Furthermore, you must know the file's physical path.
Below is a sample script (written by Rob Taylor) that sends an email attachment:
<% Option Explicit
Dim objMail Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = "firstname.lastname@example.org" objMail.Subject = "A message TO you" objMail.AttachFile("d:\images\pic.gif") objMail.To = "email@example.com" objMail.Body = "This is the body of the Message" objMail.Send
Response.write("Mail was Sent")
'You should always do this with CDONTS. set objMail = nothing %>
If you attempt to attach a file that does not exist you will receive an Unspecified Error error message...