EmailAddressCollectionAdd Method (EmailAddress)
Adds the specified EmailAddress object to the collection.

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
Syntax
public void Add(
	EmailAddress address
)

Parameters

address
Type: MailBee.MimeEmailAddress
The EmailAddress object to be added.
Exceptions
ExceptionCondition
MailBeeInvalidArgumentExceptionaddress is a null reference (Nothing in Visual Basic).
Examples
This sample loads creates new message and adds a recipient to this message as a new EmailAddress object.
// To use the code below, import MailBee namespaces at the top of your code.
using MailBee;
using MailBee.Mime;

MailMessage msg = new MailMessage();

// Set a new e-mail address.
EmailAddress adr = new EmailAddress("john_doe@domain.com");

// Add the e-mail address to the list of the recipients.
msg.To.Add(adr);
See Also