Version 3.10.0

hirondelle.web4j.webmaster
Interface Emailer

All Known Implementing Classes:
EmailerImpl

public interface Emailer

Send a simple email from the webmaster to a list of receivers.

See BuildImpl for important information on how this item is configured. 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, 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 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.


Method Summary
 void sendFromWebmaster(List<String> aToAddresses, String aSubject, String aBody)
          Send an email from the webmaster to a list of receivers.
 

Method Detail

sendFromWebmaster

void sendFromWebmaster(List<String> aToAddresses,
                       String aSubject,
                       String aBody)
                       throws AppException
Send an email from the webmaster to a list of receivers.

Parameters:
aToAddresses - contains email addresses of the receivers, as a List of Strings that satisfy WebUtil.isValidEmailAddress(String)
aSubject - satisfies Util.textHasContent(java.lang.String)
aBody - satisfies Util.textHasContent(java.lang.String)
Throws:
AppException

Version 3.10.0

Copyright Hirondelle Systems. Published September 20, 2008 - User Guide - All Docs.