Log In    |    Knowledge Base    |    4D Home
Tech Tip: Sending e-mails containing umlaut characters with the 4D Internet Commands Plug-
PRODUCT: 4D Internet Commands | VERSION: 6.7 | PLATFORM: Mac & Win
Published On: November 9, 2001

Sending e-mails with umlaut characters may not work by default with the 4D Internet Commands Plug-in. E-mails may not display the characters correctly. This is the case if you want to send an email in German or French for example. To make it work properly, you need to specify your character set when building your e-mail using the SMTP_SetPrefs and SMTP_CharSet commands.

For example:

SMTP_SetPrefs (1;1;0) ` add line feeds, auto-detect body type & line length
` either US-ASCII/7bit or ISO-8859-1/quotable-printable based on message content

$err:=SMTP_Charset (1; 1) ` Convert using the specified charset
` if ISO-8859-1 or ISO-2022-JP encode extended characters

This means that I'll define my charset with SMTP_SetPrefs and encode the header and the body with SMTP_Charset. If the message contains extended characters they will be automatically encoded by the IC Plug-in before sending.