EmailAddressCollectionAsString Property
Gets or sets all the e-mail addresses in the collection as a string.

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
Syntax
public string AsString { get; set; }

Property Value

Type: String
A string containing all the full e-mail addresses in the collection (with display names and remarks if any).
Remarks

Another way of adding e-mail addresses to the collection is using Add(EmailAddress) method.

The e-mail addresses will be delimited with comma (,). However, if the given collection belongs to the MailMessage object (for instance, represents To property), the delimiter in the output string will be either comma (,) or semicolon (;) depending on MailMessage.Builder.AddressDelimeter property value. Anyway, when parsing an e-mail address string rather than building it, both comma and semicolon are recognized as valid delimiters.

Examples
This sample creates a new collection of e-mail addresses and displays each address from this collection.
// To use the code below, import MailBee namespaces at the top of your code.
using MailBee;
using MailBee.Mime;

EmailAddressCollection adrs = new EmailAddressCollection("jdoe@domain1.com, some one <someone@domain2.com>, me@host.com (Comment)");
adrs.AsString = @"user1@domain.com, ""User 2"" <user2@domain.com>, user3@domain.com (Domain Company, LLC)";
foreach (EmailAddress address in adrs)
{
    Console.WriteLine(address.Email);
}
See Also