Initializes a new EmailAddressCollection instance from a string containing e-mail addresses.
This sample creates a new collection of the e-mail addresses and displays each address in this collection.
[C#] // 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)"); foreach (EmailAddress address in adrs) { Console.WriteLine(address.Email); }
[Visual Basic] ' To use the code below, import MailBee namespaces at the top of your code. Imports MailBee Imports MailBee.Mime Dim adrs As EmailAddressCollection = New EmailAddressCollection("jdoe@domain1.com, some one <someone@domain2.com>, me@host.com (Comment)") For Each address As EmailAddress In adrs Console.WriteLine(address.Email) Next
EmailAddressCollection Class | MailBee.Mime Namespace | EmailAddressCollection Constructor Overload List | AsString