Email Plugin - msg.getPlainMsg() character set problem

Using the plugin - plugins.mail.receiveMail, I’m trying to receive Japanese emails or any other emails (like German) that use a different character set but the body - msg.getPlainMsg() gets scrambled. However, the subject or msg.getSubject() Japanese is fine in debugger and database.

This happens when I’m viewing the variables in the debugger before they even write to the database so it’s not a database char set issue.

Same problem with msg.getHtmlMsg().

Same problem sending, the text body is bad but subject ok. When I send an email, even tho I set the mail.mime.charset to something different, utf-8 for example, the email on the other end says “Content-Type: text/plain; charset=us-ascii” and the body is scrambled.

Only the text with Japanese gets scrambled, not the english letters.

I have tried this on my English Windows XP and Japanese Windows XP.

I have set the mail.mime.charset in servoy.properties = ISO-2022-JP, utf8 , Shift-JIS, cp932. None worked.

I used Java 1.6 and 1.5.

Current setup is:

Servoy Developer
Version 3.1.4-build 408
Java version 1.5.0_11-b03 (Windows XP)

Email I get is in ISO-2022-JP, shift-jis

Anyone have any ideas? Is this a known problem?

I was able to make a trouble ticket.

Thank you,

Steve

I think I know whats wrong. I need to set the “Content-Type…” to:

“Content-Type: text/plain; charset=ISO-2022-JP” - what an email has when I send from www.yahoo.co.jp

Instead it’s sending:

“Content-Type: text/html; charset=us-ascii”

No matter what I set "mail.mime.charset: " to. However when I change the content-type parameter it does change the subject:

“Subject: =?UISO-2022-JP?B?/v8wWTBmMHYAIA==?=”

Hence the subject is ok and not the body.

How do I change the content type? Anybody know? Or is this a bug?

Thanks a ton, it’s the last thing I need to fully make Servoy Japan friendly.

Steve

I heard they fixed this in the next public release. Thank you Servoy Support for the very fast response.

Steve