MailBee.NET Objects 4.0

EmailAddress.Parse Method 

Parses an e-mail address string and returns EmailAddress object which represents the given e-mail addresses.

public static EmailAddress Parse(
   string addressString
);

Parameters

addressString
The full e-mail address string (with optional remarks and friendly name) to parse.

Return Value

EmailAddress object representing addressString address.

Example

This sample creates a new instance of EmailAddress object from string.

[C#]
// To use the code below, import MailBee namespaces at the top of your code.
using MailBee;
using MailBee.Mime;

EmailAddress adr = EmailAddress.Parse("User <user@domain.com>");
Console.WriteLine(adr.DisplayName);
Console.WriteLine(adr.Email);
[Visual Basic]
' To use the code below, import MailBee namespaces at the top of your code.
Imports MailBee
Imports MailBee.Mime

Dim adr As EmailAddress = EmailAddress.Parse("User <user@domain.com>")
Console.WriteLine(adr.DisplayName)
Console.WriteLine(adr.Email)

See Also

EmailAddress Class | MailBee.Mime Namespace