• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

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&gt;).

Inheritance
object
InternetAddress
MailboxAddress
Inherited Members
InternetAddress.Name
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: DRIT.Mail.Rfc.Mime
Assembly: DRIT.Mail.dll
Syntax
public sealed class MailboxAddress : InternetAddress

Constructors

View Source

MailboxAddress(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.

View Source

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. user@domain).

Properties

View Source

Address

Gets the email address (e.g. user@domain).

Declaration
public string Address { get; }
Property Value
Type Description
string
View Source

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 Source

ToString()

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
Overrides
InternetAddress.ToString()
  • View Source
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX