Hi

I'm trying out Log4j 2 (2.0-beta7) in a project. I.e. in my code I use SLF4J, 
include Log4j 2 jars at runtime and assure by the use of Log4j 2 
ConsoleAppender that my logging events indeed reach Log4j.

Now I would like to extend my logging output by adding an SMTPAppender that 
will forward to an SMTP server that uses SSL and MD5 challenge-response 
authentication. So far I have included javamail 1.4.7 jar into classpath at 
runtime. By this there is no error during execution of my application. Thus I 
use these as possible values of property smtpPort below. I have also added the 
SMTP appender to my root logger 

I have scanned the ports on the server and checked that both 465 and 587 are 
open. (Also I successfully send email via this server using the same 
credentials in Mac OS X Mail client.)

Key parts of my configuration XML (in strict flavor) goes like this:

<appender type="SMTP" name="Mail" suppressExceptions="false"
        subject="Error log" to="${toAddress}" from="${fromAddress}"
        smtpHost="${smtpHost}" smtpPort="${smtpPort}" smtpProtocol="smtps"
        smtpUsername="${smtpUsername}" smtpPassword="${smtpPassword}"
        smtpDebug="true" bufferSize="1">
…
<loggers>
        <root level="info">
                <appender-ref ref="Console" />
                <appender-ref ref="Mail" />
        </root>
</loggers>

However, as you probably guess by the nature of this email, I receive no email. 
Anyone with a few hints up there sleves? Any other dependency or version 
conflict to be aware of? Missing config options?

--
Sincerely,
Jens Ivar Jørdre
about.me/jijordre

Reply via email to