I have a very specific problem related to javax.mail api, and I have no clue as of now whether it is a problem with my code, or whether a problem with some client side infrastructure. It would be very helpful if someone could post some advise here.
I'm using javax.mail api to construct a multipart message. This application is being used to send mails in German language and hence German umlauts and special characters constitutes a part of the emails (for eg Ä,ä,Ü,ü,Ö,ö,ß etc). Now when the mails are sent out, these characters are visible in almost all email clients for eg Hotmail, Gmail, IBM's Lotus Notes etc. But our client uses Microsoft Outlook 2003, and it seems the umlauts vanishes from the mail body. They are replaced by blank spaces !!
We have tried installing MS Outlook 2003 to our local systems, and configure it to Gmail, and were not able to reproduce the problem. Hence I understand this is not a typical problem with Outlook 03, however have no clue what the problem could be. It could be a problem with the code, or with our client's infrastructure but I'm looking for specific answers here.
The following part sets the body text
lTextPart.setText( <This part is blank>, "utf-8" );
lTextPart.setHeader( "MIME-Version" , "1.0" );
lTextPart.setHeader( "Content-Type" , lTextPart.getContentType() );
The parts within <> are strings conatining mail body which has those special umlaut characters. The lTextPart is normally blank and hence I won't bother about its contents.
I have also tried the following line for lHtmlPart, but it does not solve the problem
lHtmlPart.setContent( <Actual HTML content part>, "text/html; charset=utf-8");
Do let me know if I need to furnish some more details here. And if somebody could suggest what might be wrong at our client's infra end, that might also be very helpful.
Any help would be deeply appreciated.