Click or drag to resize
MimeKit

HeaderGetValue Method (Encoding)

Gets the header value using the specified character encoding.

Namespace:  MimeKit
Assembly:  MimeKit (in MimeKit.dll) Version: 3.0.0
Syntax
C#
public string GetValue(
	Encoding encoding
)

Parameters

encoding
Type: System.TextEncoding
The character encoding to use as a fallback.

Return Value

Type: String
The value.
Remarks

If the raw header value does not properly encode non-ASCII text, the decoder will fall back to a default charset encoding. Sometimes, however, this default charset fallback is wrong and the mail client may wish to override that default charset on a per-header basis.

By using this method, the client is able to override the fallback charset on a per-header basis.

See Also