Mailbox AddressTo String(Format Options, Boolean) Method
Return a string representation of the MailboxAddress,
optionally encoding it for transport.
Definition
Namespace: MimeKit
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
A string representing the MailboxAddress.
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public override string ToString(
FormatOptions options,
bool encode
)Parameters
- options FormatOptions
- The formatting options.
- encode Boolean
- If set to , the MailboxAddress will be encoded.
Return Value
StringA string representing the MailboxAddress.
Remarks
Returns a string containing the formatted mailbox address. If the encode
parameter is , 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.
Exceptions
| ArgumentNullException | options is . |