Assuming your files already exist on the server:
1) Include the Server.MapPath(
It doesn't seem to like virtual paths
2) Set the BodyFormat and Mail Format to Zero(0)
3) Then repeat the Attachfile method for each file
<%
Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = "test@myserver.com"
objMail.To = "youremail@account.net"
objMail.Subject = "Multiple File Attachments"
objMail.Body = "Intentionally Left Blank"
objMail.BodyFormat = 0
objMail.MailFormat = 0
objMail.AttachFile( Server.MapPath("images") & "\file1.jpg")
objMail.AttachFile( Server.MapPath("images") & "\file2.jpg")
objMail.AttachFile( Server.MapPath("images") & "\file3.jpg")
objMail.Send
Set objMail=Nothing
%>
No comments:
Post a Comment