Class EmailAddress
A email address, as specified by rfc822.
Inherited Members
Namespace: IRM.Mail
Assembly: IRM.dll
Syntax
public class EmailAddress
Remarks
Represents an email address for a single recipient/sender.
Constructors
EmailAddress()
EmailAddress(String)
Creates a new instance of EmailAddress.
Declaration
public EmailAddress(string address)
Parameters
String
address
The email address. |
EmailAddress(String, String)
Creates a new instance of EmailAddress.
Declaration
public EmailAddress(string address, string name)
Parameters
String
address
The email address. |
String
name
The display name of the address. |
Properties
Address
Gets or sets the email address.
Declaration
public string Address { get; set; }
Property Value
String
The email address. |
Remarks
Represents the actual email address and is in the form of user@example.com
.
Name
Gets or sets the display name of the address.
Declaration
public string Name { get; set; }
Property Value
String
The name of the address. |
Remarks
A name is optional and is typically set to the name of the person or group that own the email address.
Methods
Parse(String)
Parses a string of one or more email addresses.
Declaration
public static EmailAddress[] Parse(string addresses)
Parameters
String
addresses
The string with email addresses. |
Returns
EmailAddress[]
An array of EmailAddress. |
ToString()
Operators
Implicit(EmailAddress to MailAddress)
Converts an EmailAddress to a System.Net.Mail.MailAddress.
Declaration
public static implicit operator MailAddress(EmailAddress address)
Parameters
EmailAddress
address
The EmailAddress. |
Returns
System.Net.Mail.MailAddress
|
Implicit(String to EmailAddress)
Converts a string to an EmailAddress.
Declaration
public static implicit operator EmailAddress(string address)
Parameters
String
address
The email address. |
Returns
EmailAddress
|