Click here to Skip to main content
15,867,986 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
Hey!

I'm currently facing a problem setting up emails with Arabic characters using the JavaMail API.

I'm able to set a 8-bit encoding when I'm adding my message text directly:
oMimeMessage.setText(oMail.getBody(), "UTF-8");


works fine, Arabic characters are interpret correctly at the receivers side. Anyway, there seems to be no such simple solution when the message also contains attachments.
Then I'm forced to create a MultiPart message which seems to be only able to handle 7-bit encoding (regarding some RFC 822)

Does anyone have a workaround or another hind for me how to get both into a message - attachments AND Arabic characters?

EDIT:
OK, now this gets even more wired. I have been playing around with this and found out, that Thunderbird is able to send Arabic text and Attachments together:

CSS
This is a multi-part message in MIME format.
--------------020306090309010908030002
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

ۻݝݑݢݗݤݓݦݕݧݩݚۻݓݦݕݧݩݚۻۼݢښڟڟڱڤ
020306090309010908030002----------------------------------
Content-Type: image/jpeg;
 name="alg_revolver.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="alg_revolver.jpg"


Now how do they archive this?
Posted
Updated 1-Jul-11 1:42am
v3

1 solution

Reopened Again - Who can help me with this?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900