Mail using Java Mail components - in Arabic -urgent help required

Hi All,

I happen to get the following requirements for our Website

1.) A e-card functionality is to be provided

2.) The user will type the e-card in Arabic

3.) A auto mail is generated ( Via Java Component ) and is passed on to the receivers who will read the message typed in Arabic

I have attached a code snippet of our mailer component which will generate the e-mail message The component works fine for all English based emails but if I happen to type the Arabic letter's at the receiver end I am getting the message as follows

? ? ?

I have tried adding the following lines (Marked in RED) to my mailer component, but the issue is not resolved, if any one can suggest what changes I have to make to my mail component to send mails in Arabic.

I receive my mail using outlook express do I need to configure my out-look in order to receive mails in Arabic. ( If so what changes are to be made)

As this issue is pending for some time, I would really appreciate if any help can be offered to resolve the same.

public void sendMail(MailMessage mailmessage)

{

Session session = Session.getInstance(properties, authenticator);

MimeMessage mimemessage = new MimeMessage(session);

mimemessage.setText(mailmessage.getContent());

mimemessage.setSubject(mailmessage.getSubject());

InternetAddress internetaddress = new InternetAddress(mailmessage.getFromAddress());

mimemessage.setFrom(internetaddress);

mimemessage.setSentDate(new Date());

String arra[] = {"ar"};

mimemessage.setContentLanguage(arra);

Transport.send(mimemessage);

}

Thanks and Regards

SivaRamVishnuKumar.S

[1724 byte] By [SivaFsharpa] at [2007-10-2 5:33:48]
# 1
you dont need to configue outlook,you need to add the followingmimemessage.setHeader("Content-Type", "text/plain; charset=Windows-1256");mimemessage.setHeader("Content-Transfer-Encoding", "quoted-printable");
samhozeea at 2007-7-16 1:44:34 > top of Java-index,Desktop,I18N...
# 2

Hi,

Thanks a lot for the help offered

I got this thing through by adding the following lines in my code

mimemessage.setHeader("Content-Transfert-Encoding","8Bit");

mimemessage.setHeader("Content-Type", "text/html");

mimemessage.setText(mailmessage.getContent(), "utf-8");

I dont know if there is any other way the same can be realized

But thanks again

sivaramvishnukumara at 2007-7-16 1:44:34 > top of Java-index,Desktop,I18N...