EmailAddressCollectionAddFromString Method
Adds the specified full e-mail addresses (including display name if any) to the collection.

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
public void AddFromString(
	string addressString


Type: SystemString
The string containing the full e-mail addresses delimited with comma (,) or semicolon (;).
MailBeeInvalidArgumentExceptionaddressString is a null reference (Nothing in Visual Basic).

For instance, if the string is "John Doe" <> (ABC Company), a single EmailAddress object will be appended to the collection and its DisplayName property will be set to John Doe, Remarks property will be set to ABC Company, and the Email property will be set to value.

This sample creates the new message and adds the new recipient's e-mail address to this message.
// To use the code below, import MailBee namespaces at the top of your code.
using MailBee;
using MailBee.Mime;

// Create a new MailMessage object.
MailMessage msg = new MailMessage();

// Add the mail address to the collection.
msg.To.AddFromString("John Doe <> (ABC Company)");
See Also