EmailAddressGetAccountName Method
Gets the account name of the e-mail address.

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.2.0 build 630 for .NET 4.5
public string GetAccountName()

Return Value

Type: String
A string containing the account name of the e-mail address.

For instance, the account value will be returned for the e-mail. To get the domain name, the developer should use the GetDomain method.

To extract account name from the supplied e-mail address without creating an instance of EmailAddress class, use GetAccountNameFromEmail(String) method.

This sample creates a new e-mail address and displays the account name of this address.
// To use the code below, import MailBee namespaces at the top of your code.
using MailBee;
using MailBee.Mime;

EmailAddress adr = new EmailAddress();

// Add display name.
adr.DisplayName = "John Doe";

// Add e-mail address.
adr.Email = "";

// Add remarks.
adr.Remarks = "ABC Company";

// Show account name string.
See Also