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!

Multiple Attachments with CDONTS

Status
Not open for further replies.

carla

Technical User
Jan 9, 2001
39
US
Hi-

I have an HTML form that the user can fill out and attach a file to and send it to a mass mailing list. It works just fine. But now I need to 2 more fields to the form so that a user can send from 1-3 attachments.

I added the fields to the form and created 2 more instances of the AttachFile method. However when I try to send only one attachment ASP gives me an error because it is expecting 2 more. It works fine if I send all 3 attachments. I know that I have to add code that will ignore AttachFile if the form fields are empty, but I can't quite pin down the correct code and get it to work.

Any thoughts?

Best Regards,
Carla
 
If Not IsEmpty(GetParm("field Name")) Then
set objAttach= collattAachments.Add([name].. ..
End if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top