public class EmailModule extends AbstractModule
Modifier and Type | Field and Description |
---|---|
protected static java.util.regex.Pattern |
charsetPattern |
protected java.lang.String |
defaultCharset |
protected java.lang.String |
defaultContentType |
protected java.lang.String |
defaultFrom |
protected java.lang.String |
defaultSubject |
protected java.util.Properties |
mailProps |
protected java.lang.String |
smtpPass |
protected int |
smtpPort |
protected java.lang.String |
smtpServer |
protected boolean |
smtpSSLAuth |
protected boolean |
smtpTLS |
protected java.lang.String |
smtpUser |
autoStart, isInitialized, isRunning, logging, loggingModule, moduleManager
Constructor and Description |
---|
EmailModule() |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<Module> |
getDependencies(ModuleManager manager)
Returns all the modules this module depends on.
|
void |
init(ModuleManager manager,
java.util.HashMap<java.lang.String,java.lang.Object> settings)
Initialises the module.
|
boolean |
send(java.util.List<java.lang.String> recipients,
java.lang.String from,
java.lang.String subject,
java.util.List<javax.mail.BodyPart> parts) |
boolean |
send(java.util.List<java.lang.String> recipients,
java.lang.String from,
java.lang.String subject,
javax.mail.internet.MimeMultipart content) |
boolean |
send(java.util.List<java.lang.String> recipients,
java.lang.String from,
java.lang.String subject,
java.lang.Object message,
java.lang.String mimeType) |
boolean |
send(java.lang.String recipient,
java.lang.String from,
java.lang.String subject,
java.lang.Object message) |
boolean |
send(java.lang.String recipient,
java.lang.String from,
java.lang.String subject,
java.lang.Object message,
java.lang.String mimeType) |
isInitialized, isRunning, requireLogging, start, stop, toString
protected java.lang.String smtpServer
protected int smtpPort
protected java.lang.String smtpUser
protected java.lang.String smtpPass
protected boolean smtpTLS
protected boolean smtpSSLAuth
protected java.lang.String defaultFrom
protected java.lang.String defaultSubject
protected java.lang.String defaultCharset
protected java.lang.String defaultContentType
protected java.util.Properties mailProps
protected static java.util.regex.Pattern charsetPattern
public boolean send(java.util.List<java.lang.String> recipients, java.lang.String from, java.lang.String subject, javax.mail.internet.MimeMultipart content)
public boolean send(java.util.List<java.lang.String> recipients, java.lang.String from, java.lang.String subject, java.util.List<javax.mail.BodyPart> parts)
public boolean send(java.util.List<java.lang.String> recipients, java.lang.String from, java.lang.String subject, java.lang.Object message, java.lang.String mimeType)
public boolean send(java.lang.String recipient, java.lang.String from, java.lang.String subject, java.lang.Object message, java.lang.String mimeType)
public boolean send(java.lang.String recipient, java.lang.String from, java.lang.String subject, java.lang.Object message)
public java.util.Collection<Module> getDependencies(ModuleManager manager) throws ModuleException
Module
getDependencies
in interface Module
getDependencies
in class AbstractModule
manager
- The module manager handling this module.ModuleException
public void init(ModuleManager manager, java.util.HashMap<java.lang.String,java.lang.Object> settings) throws ModuleException
Module
Initialises the module. After constructor, this is the first method called in the life cycle of a module. It should not perform anything time consuming or anything with notable outside side effects. It should only read the parameters and initialise the module so that it can later be started. Note that a module being initialised doesn't mean that it necessarily will ever be started.
A ModuleException may be thrown if something vital is missing from the parameters or they are not sensible. In some cases you may not want to throw an exception even if vital initialisation information is missing. If, for example, it is possible that the module is initialised in some other way between the init and the start method calls. A ModuleException may also be thrown at the start method if the module is still not initialised.
init
in interface Module
init
in class AbstractModule
manager
- The module manager handling this module. You may keep a
reference to it if needed.ModuleException
Copyright 2004-2015 Wandora Team