I'm trying to log errors through email using Log4j2.
For that purpose Log4j2 defines the SMTPAppender, and an example configuration is provided to use in the XML config file, which is like:
<appenders>
<SMTP name="Mail" suppressExceptions="false" subject="Error Log" to="errors@logging.apache.org"
from="test@logging.apache.org" smtpHost="localhost" smtpPort="25" bufferSize="50">
</SMTP>
</appenders>
So everything should be fine. But when i start the application and force an error to log i receive this message:
ERROR Error processing element SMTP: CLASS_NOT_FOUND
Ok, now what to do? the documentation gives a hint, plugins, and packages should be used, both of which have little documentation, and no examples.
I got another hint in: ClassNotFoundException javax.mail.internet.AddressException when running hibernate3:hbm2ddl but this is log4j2 and not log4j.
Any help is, of course, greatly appreciated.