Back to product page

EncodeHeader Method


Encodes message header.

Type

String

Syntax

  • Basic
object.EncodeHeader (Encoding, CharSet, Text)
The EncodeHeader(object,Encoding,CharSet,Text) syntax has these parts:
objectAn expression evaluating to an object of type SmtpMsg
EncodingRequired. Specifies preferred encoding type (base64 is default).
CharSetRequired. A String value. CharSet used in encoded header.
TextRequired. A String value. Header text that will be encoded.

Remarks

EncodeHeader method is used to create encoded header when header value contains nonprintable chars (or letters from non-English systems, such as Japanese). Usually you will set CharSet to "UTF-8", and choose QuotedPrintable encoding. This is typical sample to set encoded subject, but this method can be used for other headers too:
wodSmtp.Message.Subject = wodSmtp.Message.EncodeHeader(encQUOTEDPRINTABLE, "UTF-8", "Hello there の 技術は、全世界にわたり プリプレ ")


Platforms

Windows