Team Elements

Status: Caution PostgreSQL Open Source Initiative (OSI) Java
PUBLIC PROFILE

Back to topics

Issues and Open Discussion

Mail charset

You need to be logged in to post messages

Mail charset

9/26/2006 5:38 AM EDT (edited)

Hi,

How to change the charset for emails sent by TeamElements?
Now its charset=us-ascii.

Thanks.

1. 9/28/2006 12:50 AM EDT
Default user photo

By Matt Rajkowski

Concursive Corporation
Product Design

airplane-icon-100x100.png

According to the JavaMail Class, for text messages, if the message string contains non US-ASCII characters, it will be encoded using the platform's default charset. Do you know what your platform encoding is?

There is a way to specify the default mail charset from outside of TE. From outside, you can create a .jsp file, and run it under Tomcat before using TE.

<%
System.setProperty("mail.mime.charset", "UTF-8");
%>

I'd like to review the implementation to see if this applies for the HTML messages too. Will look into this some more.

2. 9/28/2006 6:00 AM EDT

That works only for subject and content remains us-ascii. My encoding is KOI8-R, by default it sets this encoding for the subject. Using ""System.setProperty("mail.mime.charset", "UTF-8");"" affects only subject.

Subject: =?UTF-8?B?0L/RgNC40LLQtdGC?=
...
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

2 results found