EmailAddressCollectionAdd Method (String) |
Adds the specified e-mail address to the collection.
Namespace: MailBee.MimeAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public void Add(
string email
)
Public Sub Add (
email As String
)
Parameters
- email
- Type: SystemString
The string containing the actual e-mail address (such as user@domain.com).
Exceptions Remarks To add a full e-mail address (such as "John Doe, Jr." <jdoe@domain.com>),
the developer can use
AddFromString(String) method.
Examples This sample creates a new message and adds a recipient to this message.
using MailBee;
using MailBee.Mime;
MailMessage msg = new MailMessage();
msg.To.Add("john_doe@domain.com");
Imports MailBee
Imports MailBee.Mime
Dim msg As New MailMessage
msg.To.Add("john_doe@domain.com")
See Also