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

Treat empty username string as null in SMTPAppenderBase

    XMLWordPrintable

Details

    Description

      When configuring an SMTPAppender, an empty username value is treated as valid value.

      Specifically:

      <appender name="EMAIL" class="ch.qos.logback.classic.net.SMTPAppender">
        <username></username> 
      </appender>

      We use variable substitution, so it would actually be 

      <appender name="EMAIL" class="ch.qos.logback.classic.net.SMTPAppender">
        <username>${SMTP_USERNAME}</username>
      </appender>

       And sometimes we don't actually want to authenticate.

       

      It would be nice if empty usernames were handled the same as if it were never specified.

      Attachments

        Activity

          People

            logback-dev Logback dev list
            Woon Mark
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: