DotNetOpenMail 0.5.7 (beta)

IEncoder.EncodeHeaderString Method 

Encode the string according to rfc-2047 if some of it falls outside the 7bit ASCII charset.

[Visual Basic]
Function EncodeHeaderString( _ 
   ByVal name As String, _ 
   ByVal val As String, _ 
   ByVal charset As Encoding, _ 
   ByVal forceencoding As Boolean _ 
) As String
[C#]
string EncodeHeaderString(
   string name,
   string val,
   Encoding charset,
   bool forceencoding
);
[C++]
String* EncodeHeaderString(
   String* name,
   String* val,
   Encoding* charset,
   bool forceencoding
);
[JScript]
function EncodeHeaderString(
   String name,
   String val,
   Encoding charset,
   bool forceencoding
): String;

Parameters

name
The header key
val
The header value string
charset
Charset for the encoded string
forceencoding
Force encoding, even if in ascii-only.

Return Value

The encoded string

See Also

IEncoder Interface | DotNetOpenMail.Encoding Namespace