[logback-dev] [JIRA] Created: (LBCLASSIC-194) At SMTPAppender, Prameter 'CharasetEncoding' cannot be set excluding UTF-8.

Masanao Okada (JIRA) noreply-jira at qos.ch
Mon Mar 15 11:40:16 CET 2010


At SMTPAppender, Prameter 'CharasetEncoding' cannot be set excluding UTF-8.
---------------------------------------------------------------------------

                 Key: LBCLASSIC-194
                 URL: http://jira.qos.ch/browse/LBCLASSIC-194
             Project: logback-classic
          Issue Type: Bug
          Components: appender
    Affects Versions: 0.9.18
            Reporter: Masanao Okada
            Assignee: Logback dev list


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 at gmail.com</Username>
        <Password>YOUR_GMAIL_PASSWORD</Password>
        <To>EMAIL-DESTINATION</To>
        <From>YOUR_USERNAME at gmail.com</From>
        <BufferSize>4</BufferSize>
        <layout class="ch.qos.logback.classic.PatternLayout">
            <Pattern>%date %-5level %logger{255} - %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?



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the logback-dev mailing list