EmailAddressGetDomain Method
Gets the domain name of the e-mail address.

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
Syntax
public string GetDomain()

Return Value

Type: String
A string containing the domain name of the e-mail address.
Remarks
For instance, the domain value will be returned for the account@domain.com e-mail. To get the account name, the developer should use the GetAccountName method.
Examples
This sample creates a new instance of the EmailAddress object and displays the domain 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 = "jdoe@domain.com";

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

// Show domain name string.
Console.WriteLine(adr.GetDomain());
See Also