MailEnable COM Component & attachments

Discussion for developers using MailEnable.
Post Reply
Perunco

MailEnable COM Component & attachments

Post by Perunco » Mon Sep 29, 2003 2:10 pm

Hi,

I using ME COM Component on my ASP page. All is OK, but ...

how I can add two or more files as attachments?

Properties can add only one file.

Thanks,

Perunco, Italy

imagin
Posts: 20
Joined: Thu Jan 09, 2003 6:36 pm

Use the AddAttachment function.

Post by imagin » Tue Oct 21, 2003 5:07 am

Notice the use of the AddAttachment function multiple times below.

Dim oMail
Set oMail = server.CreateObject("MEMail.Message")
oMail.MailFrom = "peter@mailenable.com"
oMail.MailFromDisplayName = "Test Account"
oMail.ContentType = "text/html;"
oMail.MailTo = "peter@mailenable.com"
oMail.Subject = "Welcome to our service"
oMail.AddAttachment ("c:\autoexnt.log","autoexnt.log")
oMail.AddAttachment ("d:\amet.txt","amet.txt")
oMail.MessageBody = "<html><body><h1>Hello there,<BR>Welcome to our new service.</h1></body></html>"
oMail.SendMessage

I hope this helps.

Post Reply