Returns the string containing all the e-mail addresses in the collection.
The comma-separated list of the full e-mail addresses (with optional friendly names and remarks) in the collection.
By default, the e-mail addresses are delimited with comma (",") character. See AsString topic on how to change the delimiter to semicolon (;).
This sample creates the new collection of the e-mail addresses and displays this collection as string.
[C#] // To use the code below, import MailBee namespaces at the top of your code. using MailBee; using MailBee.Mime; EmailAddressCollection adrs = new EmailAddressCollection(); adrs.AddFromString("jdoe@domain1.com"); adrs.AddFromString("some one <someone@domain2.com>"); adrs.AddFromString("me@host.com (Comment)"); Console.WriteLine(adrs.ToString()); // Output: jdoe@domain1.com, "some one" <someone@domain2.com>, me@host.com (Comment)
[Visual Basic] ' To use the code below, import MailBee namespaces at the top of your code. Imports MailBee Imports MailBee.Mime Dim adrs = New EmailAddressCollection adrs.AddFromString("jdoe@domain1.com") adrs.AddFromString("some one <someone@domain2.com>") adrs.AddFromString("me@host.com (Comment)") Console.WriteLine(adrs.ToString()) ' Output: jdoe@domain1.com, "some one" <someone@domain2.com>, me@host.com (Comment)
EmailAddressCollection Class | MailBee.Mime Namespace | AsString