Version 4.8.0

hirondelle.web4j.webmaster
Class EmailerImpl

Object
  extended by hirondelle.web4j.webmaster.EmailerImpl
All Implemented Interfaces:
Emailer

public class EmailerImpl
extends Object
implements Emailer

Default implementation of Emailer.

Uses these init-param settings in web.xml :

Example web.xml settings, using a Gmail account:

    <init-param>
      <param-name>Webmaster</param-name>
      <param-value>myaccount@gmail.com</param-value> 
    </init-param>

    <init-param>
      <param-name>MailServerConfig</param-name>
      <param-value>
        mail.smtp.host=smtp.gmail.com       
        mail.smtp.auth=true
        mail.smtp.port=465
        mail.smtp.socketFactory.port=465
        mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
      </param-value> 
    </init-param>

    <init-param>
      <param-name>MailServerCredentials</param-name>
      <param-value>myaccount@gmail.com|mypassword</param-value> 
    </init-param>


Constructor Summary
EmailerImpl()
           
 
Method Summary
static void init(ServletConfig aConfig)
          Called by the framework upon startup, to extract configuration info from web.xml.
 void sendFromWebmaster(List<String> aToAddresses, String aSubject, String aBody)
          Send an email from the webmaster to a list of receivers.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmailerImpl

public EmailerImpl()
Method Detail

init

public static void init(ServletConfig aConfig)
Called by the framework upon startup, to extract configuration info from web.xml.


sendFromWebmaster

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

Specified by:
sendFromWebmaster in interface Emailer
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 4.8.0

Copyright Hirondelle Systems. Published June 09, 2012 - User Guide - All Docs.