org.mmbase.applications.email
Class SendMail

java.lang.Object
  extended byorg.mmbase.util.functions.FunctionProvider
      extended byorg.mmbase.module.Module
          extended byorg.mmbase.applications.email.AbstractSendMail
              extended byorg.mmbase.applications.email.SendMail
All Implemented Interfaces:
SendMailInterface, SendMailInterface

public class SendMail
extends AbstractSendMail
implements SendMailInterface

Module providing mail functionality based on JavaMail, mail-resources.

Since:
MMBase-1.6
Version:
$Id: SendMail.java,v 1.17 2006/07/06 11:49:41 michiel Exp $
Author:
Case Roole, Michiel Meeuwissen, Daniel Ockeloen

Field Summary
static String DEFAULT_MAIL_ENCODING
           
static String mailEncoding
           
 
Fields inherited from class org.mmbase.module.Module
getMaintainerFunction, getVersionFunction
 
Fields inherited from class org.mmbase.util.functions.FunctionProvider
functions, getFunctions
 
Constructor Summary
SendMail()
           
 
Method Summary
protected  MimeMessage constructMessage(String from, String to, Map headers)
          Utility method to do the generic job of creating a MimeMessage object and setting its recipients and 'from'.
 String getModuleInfo()
          provide some info on the module
 void init()
          Initializes the module. Init must be overridden to read the environment variables it needs.
This method is called by Module.startModule(), which makes sure it is not called more than once. You should not call init() directly, call startModule() instead.
 void reload()
           
 boolean sendMail(String from, String to, String data, Map headers)
          Send mail with headers
 boolean sendMultiPartMail(String from, String to, Map headers, MimeMultipart mmpart)
          Sends a 'multipart' mail.
 
Methods inherited from class org.mmbase.applications.email.AbstractSendMail
expand, onload, sendMail, sendMail, verify
 
Methods inherited from class org.mmbase.module.Module
getInitParameter, getInitParameters, getMaintainer, getModule, getModule, getModuleLoader, getModuleReader, getModules, getName, getProperties, getProperty, getVersion, hasStarted, maintainance, setInitParameter, setMaintainer, setName, setVersion, shutdown, shutdownModules, startModule, startModules, state
 
Methods inherited from class org.mmbase.util.functions.FunctionProvider
addFunction, createParameters, getFunction, getFunctions, getFunctionValue, newFunctionInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mmbase.module.SendMailInterface
expand, sendMail, sendMail, verify
 

Field Detail

DEFAULT_MAIL_ENCODING

public static final String DEFAULT_MAIL_ENCODING
See Also:
Constant Field Values

mailEncoding

public static String mailEncoding
Constructor Detail

SendMail

public SendMail()
Method Detail

sendMultiPartMail

public boolean sendMultiPartMail(String from,
                                 String to,
                                 Map headers,
                                 MimeMultipart mmpart)
Description copied from interface: SendMailInterface
Sends a 'multipart' mail.

Specified by:
sendMultiPartMail in interface SendMailInterface

getModuleInfo

public String getModuleInfo()
provide some info on the module

Overrides:
getModuleInfo in class Module

reload

public void reload()

init

public void init()
Initializes the module. Init must be overridden to read the environment variables it needs.
This method is called by Module.startModule(), which makes sure it is not called more than once. You should not call init() directly, call startModule() instead.

Overrides:
init in class Module

constructMessage

protected MimeMessage constructMessage(String from,
                                       String to,
                                       Map headers)
                                throws MessagingException
Utility method to do the generic job of creating a MimeMessage object and setting its recipients and 'from'.

Throws:
MessagingException

sendMail

public boolean sendMail(String from,
                        String to,
                        String data,
                        Map headers)
Send mail with headers

Specified by:
sendMail in interface SendMailInterface


MMBase build 1.8.1.20060716