Hi all,
I want to create a script that allows the user to send an attachment via a web page form.
My problem is getting the attachment to work. What code should I use.
Here is what I have so far:
Code:Dim MyBody Dim MyCDONTSMail dim submitted, name, email, country, comments, address1, address2, phone, attachment 'Variables already set Set MyCDONTSMail = CreateObject("CDONTS.NewMail") MyCDONTSMail.From= email MyCDONTSMail.To= "kevin@cc.ie" MyCDONTSMail.Subject="Information Request" MyCDONTSMail.AttachFile(attachment, 1) MyBody = "Name: " & name & vbCrLf MyBody = MyBody & "Email: " & email & VbCrLf MyBody = MyBody & "Address: " & address1 & VbCrLf MyBody = MyBody & "Address2: " & address2 & VbCrLf MyBody = MyBody & "County: " & county & VbCrLf MyBody = MyBody & "Phone: " & phone & VbCrLf MyBody = MyBody & "Comments: " & VbCrLf & comments & VbCrLf MyCDONTSMail.Body= MyBody set MyCDONTSMail=nothing






Bookmarks