3 replies
I strongly suggest you to download the aspmail. It is free and it makes tasks more easier. http://www.aspemail.com/download.html
Here is the code how you can attach multiple files to an e-mail. You should add another line for each attachment.
---------------------CODE-------------------
<%
' change to address of your own SMTP server
strHost = "mail.atlantech.net"
If Request("Send") <> "" Then
Set Mail = Server.CreateObject("Persits.MailSender")
' enter valid SMTP host
Mail.Host = strHost
Mail.From = "info@persits.com"
Mail.FromName = "Persits Software, Inc."
Mail.AddAddress Request("To")
' Attach two files in the same directory (any file type can be attached)
strPath = Server.MapPath(".") Mail.AddAttachment strPath & "\ps_logo.gif"
Mail.AddAttachment strPath & "\wehave.gif"
' message subject
Mail.Subject = "Logo & Motto"
' message body
Mail.Body = "Persits Software logo and motto images are attached."
Mail.Send ' send message
Response.Write "Success!
"
End If
%>
AspEmail: Attachments.asp
AspEmail: Attachments.asp
by p.jackson
Bedri,
Many thanks for your response. I have now fixed my problem and have a neat automatic email with multiple attachments.
Enjoy your TechPoints!!
Paul
by p.jackson
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending