MailboxAddress(Encoding, String, String) Constructor

Initialize a new instance of the MailboxAddress class.

Definition

Namespace: MimeKit
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public MailboxAddress(
	Encoding encoding,
	string? name,
	string address
)

Parameters

encoding  Encoding
The character encoding to be used for encoding the name.
name  String
The name of the mailbox.
address  String
The address of the mailbox.

Remarks

Creates a new MailboxAddress with the specified name and address. The specified text encoding is used when encoding the name according to the rules of rfc2047.

Exceptions

ArgumentNullException

encoding is .

-or-

address is .

ParseException address is malformed.

See Also