See {@link hirondelle.web4j.BuildImpl} for important information on how this item is configured. {@link hirondelle.web4j.BuildImpl#forEmailer()} returns the configured implementation of this interface.
Implementations of this interface will be called by the framework when it needs to send an email. For example, {@link TroubleTicket} uses such an implementation to send diagnostic information to the webmaster. The from-address is taken from the webmaster email configured in web.xml.
Sending Email on a Separate Thread
Sending an email can be slow. It is often helpful to relegate that task to a worker thread, to improve response times. However, many containers restrict or prohibit creation of threads by a servlet.
The {@link EmailerImpl} default implementation of this interface allows the option of sending email either with or without a separate worker thread. See web.xml in the example application for more details.
|
|