You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Mathias Berg <ma...@gmail.com> on 2007/01/11 15:31:07 UTC
[EMAIL] - Charset problem
Hi, i have some problem with charset when i send mail in plain text.
The text is in lithuania language, and i set charset property to
"ISO-8859-4". Yet i get the special characters in ?
angliškai -> angli?kai
This is how i create the mail.
---------------------------------------------
Email email = new SimpleEmail();
email.setHostName("localhost");
email.setSmtpPort(25);
......
//Setting from, to and so on.
....
email.setCharset(ISO-8859-4);
email.setMsg(emailConfig.getBodyText());
email.buildMimeMessage();
email.send()
---------------------------------------------
This is som info from my mail headers.
Subject: Dev: TEst lt text
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-TradeDoubler-MailID: 60487288-1331903
Return-Path: no_reply@ext.td.com
X-OriginalArrivalTime: 11 Jan 2007 12:58:37.0340 (UTC)
FILETIME=[3585DDC0:01C73580]
If i create a html mail then the charset works fine. What could i do
wrong? Or am i thinking completely wrong here?
Regards, Mathias.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org