Click or drag to resize
MimeKit

MailboxAddressToString Method (FormatOptions, Boolean)

Returns a string representation of the MailboxAddress, optionally encoding it for transport.

Namespace:  MimeKit
Assembly:  MimeKit (in MimeKit.dll) Version: 2.1.0.0
Syntax
C#
public override string ToString(
	FormatOptions options,
	bool encode
)

Parameters

options
Type: MimeKitFormatOptions
The formatting options.
encode
Type: SystemBoolean
If set to true, the MailboxAddress will be encoded.

Return Value

Type: String
A string representing the MailboxAddress.
Exceptions
ExceptionCondition
ArgumentNullExceptionoptions is null.
Remarks
Returns a string containing the formatted mailbox address. If the encode parameter is true, then the mailbox name will be encoded according to the rules defined in rfc2047, otherwise the name will not be encoded at all and will therefor only be suitable for display purposes.
See Also