Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-457

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.18
    • Fix Version/s: 0.9.19
    • Component/s: logback-classic
    • Labels:
      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

      {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?

        Attachments

          Activity

            People

            • Assignee:
              logback-dev Logback dev list
              Reporter:
              okadam Masanao Okada
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: