MimeHeader Class

A header field of a message or of a MIME part.

public sealed class MimeHeader

Properties

NameDescription
NameGets the name of the header, such as Subject.
RawValueGets the value as it is in the message: unfolded, with its encoded words ([RFC 2047]) and its comments.
ValueGets the value with its encoded words decoded.

Gets the name of the header, such as Subject.

public string Name { get; }

Property value

string

Gets the value as it is in the message: unfolded, with its encoded words ([RFC 2047]) and its comments.

public string RawValue { get; }

Property value

string

Gets the value with its encoded words decoded.

public string Value { get; }

Property value

string

Methods

NameDescription
Create(string, string)Creates a header whose value is a text: it is encoded ([RFC 2047]) when it is not ASCII.
CreateRaw(string, string)Creates a header from a value that is already formatted, such as a list of addresses or a content type.
ToString()Returns the name and the value of the header.

Create(string, string)

MimeHeader.cs

Creates a header whose value is a text: it is encoded ([RFC 2047]) when it is not ASCII.

public static MimeHeader Create(string name, string value)

Parameters

name string
The name of the header.
value string
The text.

Returns

MimeHeader The header.

CreateRaw(string, string)

MimeHeader.cs

Creates a header from a value that is already formatted, such as a list of addresses or a content type.

public static MimeHeader CreateRaw(string name, string rawValue)

Parameters

name string
The name of the header.
rawValue string
The value, as it is written.

Returns

MimeHeader The header.

ToString()

MimeHeader.cs

Returns the name and the value of the header.

public override string ToString()

Returns

string The name and the value of the header.