[logback-user] Wrong Encoding in SMTPAppender

alex alessandro.fustini at dnshosting.it
Thu Jan 15 10:02:08 CET 2009


Hi,
I configured my SMTPAppender like this

<appender name="email" class="ch.qos.logback.classic.net.SMTPAppender">
<Subject>Error on - %p%nopex</Subject>
<Encoding>UTF-8</Encoding>
<SMTPHost>192.168.11.41</SMTPHost>
<To>error at xxxxxxxx.xx</To>
<From>error at xxxxxxx.xx/From>
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%date [%thread] %-5level %logger{50} - %msg%n%ex</pattern>
</layout>
</appender>

The email is sent from code :

log.error("Ordine " + myOrderHeader.getIdorder() + " è stato pagato ma 
il prodotto è già SCADUTO !! Res / Item "
+ myOrderHeader.getIdreseller() + " / " + itemMaster.getItemId());

And this is the mail source :

------=_Part_82_50553.1232007757067
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

2009-01-15 09:22:37,067 [http--80-8] ERROR it.dnshst.useritem.UserItem - Or=
dine 158 =E8 stato pagato ma il prodotto =E8 gi=E0 SCADUTO !! Res / Item 1 =
/ 1504

------=_Part_82_50553.1232007757067--


And this is displaied

2009-01-15 09:22:37,067 [http--80-8] ERROR it.dnshst.useritem.UserItem - Ordine 158 � stato pagato ma il prodotto � gi� SCADUTO !! Res / Item 1 / 1504


All character "extend" are wrong encoding (è à).

Any Hints ?
Thanks a lot


-- 
Alex Fustini
Mysql Developer 5 Certified
Mysql Dba 5 Certified



More information about the Logback-user mailing list