cancel
Showing results for 
Search instead for 
Did you mean: 

Sending mail in Hebrew

Former Member
0 Kudos

Hi all,

I'm trying to send mail through SMTP using MimeMessage.

When I send Hebrew characters in the subject or body, I get a bunch of question marks.

I've tried using escapeToJS (or HTML,URL) and also tried using URLEncoder to encode the string to a Hebrew charset, but with no luck.

All I got was %F7%AA or #3124 kind of characters, depending of the charset.

Amit

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Amit,

Use unicode characters:

http://www.snible.org/java2/uni2java.html

Hope that helps,

Yoav.

Former Member
0 Kudos

Hi Yoav,

I've tried sending unicode characters but with no luck.

Can you send Hebrew mail using the MimeMessage via smtp?

Perhaps Outlook 2003 encoding has something to do with it...

Amit

Former Member
0 Kudos

Hi Amit,

You definitely can.

Just set the charset accordingly:

msg.setContent(htmlBody,"text/html; charset=utf-8");

In outlook you can use right click to change the viewing encoding.

You can also try different charsets and make the conversion from unicode to them in Java.

Hope that helps,

Yoav.

Former Member
0 Kudos

Hi Yoav,

Good answer.

Amit

Answers (0)