Bafflingly, there's no SMTP implementation out of the box. How is it not a basic feature?
Tried adding a custom handler type MailHandler, but I get stuck setting the properties. It seems a good chunk of them (such as the mail server's hostname) are defined by a Properties
object in the MailHandler's constructor, but I don't know how to set that up in the custom handler's properties, as it relies on setters instead.
Also tried registering a log4j SMTPAppender. Although this works surprisingly well, and the documentation claims it's legal, Wildfly threatens to bite:
16:49:21,090 WARN [org.jboss.as.logging] (management-handler-thread - 3) WFLYLOG0099: Usage of a log4j appender (org.apache.log4j.net.SMTPAppender) found in a custom-handler. Support for using appenders as custom handlers has been deprecated and will be removed in a future release.
Am I naive in thinking I will be able to pull this off without coding my own generic mail handler, or deferring the mail stuff to syslog?