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

    <SMTPHost>ADDRESS-OF-YOUR-SMTP-HOST</SMTPHost>
    <to>EMAIL-DESTINATION</to>
    <from>SENDER-EMAIL</from>


    <discriminator class="ch.qos.logback.classic.sift.MDCBasedDiscriminator">
      <key>req.remoteHost</key>
      <defaultValue>default</defaultValue>
    </discriminator>

    <subject>${HOSTNAME} -- %X{req.remoteHost} %msg"</subject>
    <layout class="ch.qos.logback.classic.html.HTMLLayout">
      <pattern>%date%level%thread%X{req.remoteHost}%X{req.requestURL}%X{req.queryString}%logger%msg</pattern>
    </layout>
  </appender>

  <root>
    <level level="DEBUG"/>
    <appender-ref ref="EMAIL" />
  </root>  
</configuration>


