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

Do not restrict SMTPAppender <to> to only 1 email address

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      It's not possible to have multiple email address in <to> element of SMTPAppender because only the first one is used (https://github.com/ceki/logback/blob/master/logback-core/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java#L270)
      When using a property, multiple <to> element is not really easy (if even possible)...

      Example:

      <appender name="email" class="ch.qos.logback.classic.net.SMTPAppender">
      ...
      <to>$

      {mail.log.to}

      </to>
      ...
      </appender>

      With properties :

      mail.log.to = admin@domain.com,dev@domain.com,op@domain.com

      => Only admin@domain.com get the email !

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ceki Ceki Gülcü
                Reporter:
                zigarn Alexandre Garnier
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: