<div style="word-wrap:break-word">I'm trying to use SMTPAppender to send a log message through gmail. I have added javax.mail:mailapi:1.4.3 as a depdendency. I also tried adding javax.activation:activation:1.1.1 with no success. If I change the host to xyz, it has no affect. This is my configuration file:<br>
<div><div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"></span>
</div>
<br><configuration debug="true"><br> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"><br> <encoder><br> <pattern><br> %-4relative [out] %-5level %logger - %msg%n<br>
</pattern><br> </encoder><br> </appender><br><br> <appender name="EMAIL" class="ch.qos.logback.classic.net.SMTPAppender"><br> <smtpHost><a href="http://smtp.gmail.com">smtp.gmail.com</a></smtpHost><br>
<smtpPort>465</smtpPort><br> <SSL>true</SSL><br> <username><a href="mailto:somebody@gmail.com">somebody@gmail.com</a></username><br> <password>somepass</password><br>
<to><a href="mailto:someone@gmail.com">someone@gmail.com</a></to><br> <from><a href="mailto:somebody@gmail.com">somebody@gmail.com</a></from><br> <subject>Testing %logger{20} - %m</subject><br>
<br> <layout class="ch.qos.logback.classic.PatternLayout"><br> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1} - %msg%n</pattern><br> </layout><br> </appender><br>
<br> <root level="info"><br> <appender-ref ref="STDOUT" /><br> <appender-ref ref="EMAIL" /><br> </root><br></configuration><br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
Console output<br><br>12:45:56,627 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]<br>12:45:56,630 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]<br>
12:45:56,644 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property<br>12:45:56,668 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.net.SMTPAppender]<br>
12:45:56,678 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [EMAIL]<br>12:45:56,714 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO<br>
12:45:56,714 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]<br>12:45:56,715 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [EMAIL] to Logger[ROOT]<br>
12:45:56,715 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.<br><br>180 [out] INFO SmtpTest - Hello World<br></div></div>