When you send targeted email, you must make sure the character set used is supported by the most popular email clients. For example, Japanese JSP templates are stored by default in the SJIS character set (on Windows) or the EUC character set (on UNIX). These are 8-bit encodings, while the default encoding for most Japanese email clients is the 7-bit ISO-2022-JP character set. You can configure an Oracle ATG Web Commerce application to send email in the ISO-2022-JP encoding.

The TemplateEmailSender component can translate email messages to different encodings for transmission. For example, you can specify that SJIS and EUC should be translated to JIS.

To specify the mapping between the template encoding and the message encoding, set the emailEncodingMap property of the TemplateEmailSender component used to send out the email. This property is a Hashtable that can list any number of mappings. For example, the default setting of this property is:


This setting specifies that if the template uses either the SJIS or EUC character set, the resulting email messages should use the ISO-2022-JP character set. (ISO-2022-JP is the IANA/MIME equivalent name for the JIS Java charset.) You can change these mappings, or append additional mappings of the form template-encoding=message-encoding (separated by commas).

You can use either the Java charset or the IANA/MIME names for the character sets. Typically, the template encoding is specified by its Java charset name and the message encoding is specified by its IANA/MIME name. (The default setting shown above uses this convention.) If you specify the Java charset name for the message encoding, TemplateEmailSender uses the equivalent IANA/MIME name in the message header.

For more information about targeted email, see the ATG Personalization Programming Guide.