EmailAddressGetDomainFromEmail Method
Gets the domain name of the specified e-mail address as a string.

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


Type: SystemString
The e-mail address as a string.

Return Value

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

For instance, the domain value will be returned for the e-mail address. To get the account name from specified e-mail address the developer should use the GetAccountNameFromEmail(String) method of the EmailAddress object.

To get an account name part or domain part of the existing EmailAddress object, the developer can use GetAccountName or GetDomain methods.

This sample extracts the account and domain names from the specified e-mail address.
// To use the code below, import MailBee namespaces at the top of your code.
using MailBee;
using MailBee.Mime;

See Also