MailMill .NET Class Library

Mail.Tos Property

Gets an EmailArray object that contains message recipients.

public EmailArray Tos {get;}

Remarks

The Tos EmailArray object contains the list of email addresses that will be displayed in the To message field. Use the Add method to append an email address to the Tos EmailArray. Use the Value property to get or set a comma separated string containing email addresses.

Example

This sample shows how to fill the Tos EmailArray.

Mail oMail = new Mail();
oMail.Tos.Value = "Marie <marie@emilltest.com>, "Sales Department" <sales@emilltest.com>";
oMail.Tos.Add("John <john@emilltest.com>");
oMail.Tos.Add(Mail.CreateEmailAddress("Lisa Marìa", "lisa@emilltest.com"));

See Also

Mail Class | MailMill Namespace | EmailArray | EmailArray.Add | EmailArray.Value