Class MailboxAddress
A single mailbox address (RFC 5322 §3.4.1), consisting of an optional display name
and an email address (e.g. John Doe <john@example.com>).
Inherited Members
Namespace: DRIT.Mail.Rfc.Mime
Assembly: DRIT.Mail.dll
Syntax
public sealed class MailboxAddress : InternetAddress
Constructors
View SourceMailboxAddress(string)
Initializes a new instance of the MailboxAddress class with no display name.
Declaration
public MailboxAddress(string address)
Parameters
| Type | Name | Description |
|---|---|---|
| string | address | Specifies the address value. |
MailboxAddress(string?, string)
Initializes a new instance of the MailboxAddress class.
Declaration
public MailboxAddress(string? name, string address)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The display name, or null if none. |
| string | address | The email address (e.g. |
Properties
View SourceAddress
Gets the email address (e.g. user@domain).
Declaration
public string Address { get; }
Property Value
| Type | Description |
|---|---|
| string |
EncodedName
Gets the RFC 2047 encoded form of the display name, or null if the name is ASCII-only or absent.
Declaration
public string? EncodedName { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
View SourceToString()
Returns the string representation of this mailbox address.
If a display name is present, returns Name <address>; otherwise returns
the bare address.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |