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?
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.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.