Class HeaderWriter
Writes MIME headers with proper folding at 78 characters (RFC 5322 §2.2.3).
Inherited Members
Namespace: DRIT.Mail.Rfc.Mime.Writing
Assembly: DRIT.Mail.dll
Syntax
public static class HeaderWriter
Methods
View SourceFoldLine(StringBuilder, string)
Folds a long header line at whitespace boundaries, inserting CRLF + space continuation markers. If no suitable whitespace is found, the line is left unfolded (tolerant behavior for very long tokens).
Declaration
public static void FoldLine(StringBuilder sb, string line)
Parameters
| Type | Name | Description |
|---|---|---|
| StringBuilder | sb | Specifies the sb value. |
| string | line | Specifies the line value. |
Write(StringBuilder, string, string)
Writes a header line (name: value) to the specified StringBuilder, folding lines that exceed 78 characters.
Declaration
public static void Write(StringBuilder sb, string name, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| StringBuilder | sb | Specifies the sb value. |
| string | name | Specifies the name value. |
| string | value | The value to process. |