Adding multiple addresses to a message

I currently use a syntax like the following:

msg.AddAddress(New Aspose.Email.Address(toEmails), Aspose.Email.Address.Type.To)

to add email addresses to a Message object. I’m wondering if there is a way to add a string which contains multiple comma or semi-colon delimited addresses to a message, or must I parse them out and add them separately?

Thanks,

James

Dear James,

The component does not provide the overriding method to accept string array for email addresses.

And we will include your idea for the next version.

kyle

Hi,

is this functionnality now available ?

Regards,

Thank you for your interest in Aspose products.

By using Aspose.Email for .NET component, you can add multiple email address in To and CC fields. Please check the related technical article from online documentation.

If you want to add multiple email address from a single string then you can also achieve that as demonstrated below.

C#

var message = new Aspose.Email.Mail.MailMessage();
message.To.Add(“abc@domain.com,xyz@domain.com”);
message.Save(“output.msg”, MailMessageSaveType.OutlookMessageFormat);

Note: Output of above sample code is attached in an archive.