4D Internet Commands v14SMTP_Charset |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D Internet Commands v14
SMTP_Charset
SMTP_Charset
The SMTP_Charset command allows automatic support of messages containing extended characters while sending them with the SMTP_QuickSend or SMTP_Send commands. If this command is not called or has parameters set to 0, version 6.7 or higher of 4D Internet Commands will work the same way as version 6.5.x. The SMTP_Charset command allows first, to define if the SMTP_SetPrefs bodyType parameter value must be applied to convert the message headers and body, and second, to define if a header containing extended characters must be encoded using the “=?ISO-8859-1?Q?Test=E9?= …” syntax as specified in the RFC#1342. This command has an interprocess scope and will have effect on all subsequent messages sent using the SMTP_QuickSend and SMTP_Send in any 4D process. This command is particularly useful for supporting extended characters included in the message headers such as Subject or mail addresses (for example, address encoding such as “=?ISO-8859-1?Q?Test=E9?= <test@n.net >”). Depending on the message headers, encoding (always set to Base64 (except for Subject header) and depending on the SMTP_SetPrefs bodyType parameter value) will be managed as follows:
The encodeHeaders parameter specifies how to handle header conversion and encoding while sending a message. Default value is set to 0.
Note: Extended headers such as “X_…” must use exclusively US ASCII codes. The bodyCharset parameter specifies how to handle the message body character set conversion while sending a message. Default value is set to 0.
In this example, the subject and the body are converted using the ISO-8859-1 character set, and the subject is encoded following the RFC 1342 syntax: SMTP_SetPrefs(1;1;0) |
PROPERTIES
Product: 4D Internet Commands
HISTORY
Modified: 4D Internet Commands 6.8.1 SEE ALSO ARTICLE USAGE
4D Internet Commands ( 4D Internet Commands v11.4) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||