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

