EmailAddressGetDomainFromEmail Method |
Gets the domain name of the specified e-mail address as a string.
Namespace: MailBee.MimeAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public static string GetDomainFromEmail(
string email
)
Public Shared Function GetDomainFromEmail (
email As String
) As String
Parameters
- 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.
Remarks Examples This sample extracts the account and domain names from the specified e-mail address.
using MailBee;
using MailBee.Mime;
Console.WriteLine(EmailAddress.GetAccountNameFromEmail("user1@domain.com"));
Console.WriteLine(EmailAddress.GetDomainFromEmail("user1@domain.com"));
Imports MailBee
Imports MailBee.Mime
Console.WriteLine(EmailAddress.GetAccountNameFromEmail("user1@domain.com"))
Console.WriteLine(EmailAddress.GetDomainFromEmail("user1@domain.com"))
See Also