EmailAddressGetDomain Method |
Gets the domain name of the e-mail address.
Namespace: MailBee.MimeAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public string GetDomain()
Public Function GetDomain As String
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.
using MailBee;
using MailBee.Mime;
EmailAddress adr = new EmailAddress();
adr.DisplayName = "John Doe";
adr.Email = "jdoe@domain.com";
adr.Remarks = "ABC Company";
Console.WriteLine(adr.GetDomain());
Imports MailBee
Imports MailBee.Mime
Dim adr As New EmailAddress
adr.DisplayName = "John Doe"
adr.Email = "jdoe@domain.com"
adr.Remarks = "ABC Company"
Console.WriteLine(adr.GetDomain())
See Also