Details
-
Bug
-
Resolution: Fixed
-
Major
-
0.9.18
-
None
Description
Hello,
I use logback-0.9.18 and slf4j-1.5.11
At SMTPAppender, I want to encode in the designated charset using parameter 'CharsetEncoding'.
I set to look at the manual as follows.
(manual:http://logback.qos.ch/manual/appenders.html#SMTPAppender)
<configuration>
<appender name="EMAIL" class="ch.qos.logback.classic.net.SMTPAppender">
<SMTPHost>smtp.gmail.com</SMTPHost>
<SMTPPort>465</SMTPPort>
<SSL>true</SSL>
<Username>YOUR_USERNAME@gmail.com</Username>
<Password>YOUR_GMAIL_PASSWORD</Password>
<To>EMAIL-DESTINATION</To>
<From>YOUR_USERNAME@gmail.com</From>
<BufferSize>4</BufferSize>
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>%date %-5level %logger
- %message%n</Pattern>
</layout>
<CharsetEncoding>ISO-2022-JP</CharsetEncoding>
</appender>
<root>
<level value="ERROR" />
<appender-ref ref="EMAIL" />
</root>
</configuration>
I look at outgoing mail as follows.
Charset is not "ISO-2022-JP" !!
------=_Part_0_26281671.1268558498468
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
2010-03-14 18:21:38,250 ERROR logger.test.EncodingTest - Error Log
-----=_Part_0_26281671.1268558498468-
'Encoding' 'CharsetEncoding' instead of using as follows, the result is the same.
<appender name="EMAIL" class="ch.qos.logback.classic.net.SMTPAppender">
....
<Encoding>ISO-2022-JP</Encoding>
....
</appender>
Could you confirm it?