Click or drag to resize
MimeKit

ParameterEncodingMethod Enumeration

The method to use for encoding Content-Type and Content-Disposition parameter values.

Namespace: MimeKit
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
C#
public enum ParameterEncodingMethod
Members
Member nameValueDescription
Default0 Use the default encoding method set on the FormatOptions.
Rfc22311 Use the encoding method described in rfc2231.
Rfc20472 Use the encoding method described in rfc2047 (for compatibility with older, non-rfc-compliant email clients).
Remarks
The MIME specifications specify that the proper method for encoding Content-Type and Content-Disposition parameter values is the method described in rfc2231. However, it is common for some older email clients to improperly encode using the method described in rfc2047 instead.
Example
C#
// Some versions of Outlook expect the rfc2047 style of encoding of parameter values.
foreach (var parameter in part.ContentDisposition.Parameters)
    parameter.EncodingMehod = ParameerEncodngMethod.Rfc2047;
See Also