Has anyone found documentation or figured out how to attach multiple files to a message using .AttachmentFileName and .AttachmentName?
I am using ASP and am stuck!
MEMail.Message & Multiple Attachments
Multiple Attachments
This came from ME tech support:
oMail.MailFrom = "peter@mailenable.com"
oMail.MailFromDisplayName = "My Account"
oMail.MailTo = "peter@mailenable.com"
oMail.ContentType = "text/html;"
oMail.AddAttachment "c:\myfile1.pdf", "The file1.pdf"
oMail.AddAttachment "c:\myfile2.pdf", "The file2.pdf"
oMail.AddAttachment "c:\myfile3.pdf", "The file3.pdf"
oMail.Subject = "<B>New update information</B>"
oMail.MessageBody = sContents
oMail.SendMessage
oMail.MailFrom = "peter@mailenable.com"
oMail.MailFromDisplayName = "My Account"
oMail.MailTo = "peter@mailenable.com"
oMail.ContentType = "text/html;"
oMail.AddAttachment "c:\myfile1.pdf", "The file1.pdf"
oMail.AddAttachment "c:\myfile2.pdf", "The file2.pdf"
oMail.AddAttachment "c:\myfile3.pdf", "The file3.pdf"
oMail.Subject = "<B>New update information</B>"
oMail.MessageBody = sContents
oMail.SendMessage
Re: MEMail.Message & Multiple Attachments
How can I add attachments programmatically?
This is what I have now, but the attachments are missing with no errors.
If ucase(mailtype)="MEMAIL" Then
Set Mailer = Server.CreateObject("MEMail.Message")
if err.number<> 0 then
mailerror= getlang("langmailerror") & " " & mailtype
HandleMailError mailerror
exit sub
end if
Mailer.MailTo = my_toaddress
Mailer.MailFrom = my_fromaddress
Mailer.MailFromDisplayName = my_from
Mailer.Subject = my_subject
Mailer.MessageBody = body
If htmlformat="HTML" then
Mailer.ContentType = "text/html"
end if
If Orderattachmentcount>0 then
for i = 0 to orderattachmentcount-1
Mailer.AddAttachment orderattachments(i), "download" &(i) &".zip"
If getconfig("xdebug")="Yes" then
Debugwrite "adding " & orderattachments(i)
end if
next
Orderattachmentcount=0
end if
Mailer.SendMessage
set mailer=nothing
exit sub
end if
This is what I have now, but the attachments are missing with no errors.
If ucase(mailtype)="MEMAIL" Then
Set Mailer = Server.CreateObject("MEMail.Message")
if err.number<> 0 then
mailerror= getlang("langmailerror") & " " & mailtype
HandleMailError mailerror
exit sub
end if
Mailer.MailTo = my_toaddress
Mailer.MailFrom = my_fromaddress
Mailer.MailFromDisplayName = my_from
Mailer.Subject = my_subject
Mailer.MessageBody = body
If htmlformat="HTML" then
Mailer.ContentType = "text/html"
end if
If Orderattachmentcount>0 then
for i = 0 to orderattachmentcount-1
Mailer.AddAttachment orderattachments(i), "download" &(i) &".zip"
If getconfig("xdebug")="Yes" then
Debugwrite "adding " & orderattachments(i)
end if
next
Orderattachmentcount=0
end if
Mailer.SendMessage
set mailer=nothing
exit sub
end if