org.mmbase.module
Class JMSendMail

java.lang.Object
  extended byorg.mmbase.module.Module
      extended byorg.mmbase.module.AbstractSendMail
          extended byorg.mmbase.module.JMSendMail
All Implemented Interfaces:
SendMailInterface
Direct Known Subclasses:
SendMail

public class JMSendMail
extends AbstractSendMail

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

Since:
MMBase-1.6
Version:
$Id: JMSendMail.java,v 1.3.2.4 2004/06/10 09:16:59 pierre Exp $
Author:
Case Roole, Michiel Meeuwissen

Field Summary
static java.lang.String DEFAULT_MAIL_ENCODING
           
static java.lang.String mailEncoding
           
protected  javax.mail.Session session
           
 
Constructor Summary
JMSendMail()
           
 
Method Summary
protected  javax.mail.internet.MimeMessage constructMessage(java.lang.String from, java.lang.String to, java.util.Map headers)
          Utility method to do the generic job of creating a MimeMessage object and setting its recipients and 'from'.
 java.lang.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()
          {@inheritDoc}
 boolean sendMail(java.lang.String from, java.lang.String to, java.lang.String data, java.util.Map headers)
          Send mail with headers
 
Methods inherited from class org.mmbase.module.AbstractSendMail
expand, onload, sendMail, sendMail, verify
 
Methods inherited from class org.mmbase.module.Module
getInitParameter, getInitParameters, getMaintainer, getMimeType, getMimeTypeFile, getModule, getModule, getModules, getName, getProperties, getProperty, getVersion, hasStarted, loadModulesFromDisk, maintainance, setInitParameter, setMaintainer, setName, setVersion, shutdown, shutdownModules, startModule, startModules, state
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAIL_ENCODING

public static final java.lang.String DEFAULT_MAIL_ENCODING
See Also:
Constant Field Values

mailEncoding

public static java.lang.String mailEncoding

session

protected javax.mail.Session session
Constructor Detail

JMSendMail

public JMSendMail()
Method Detail

reload

public void reload()
{@inheritDoc}


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.

Specified by:
init in class Module

constructMessage

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

Throws:
javax.mail.MessagingException
Since:
MMBase-1.7.1

sendMail

public boolean sendMail(java.lang.String from,
                        java.lang.String to,
                        java.lang.String data,
                        java.util.Map headers)
Send mail with headers


getModuleInfo

public java.lang.String getModuleInfo()
Description copied from class: Module
provide some info on the module

Overrides:
getModuleInfo in class Module


MMBase build 1.7.1.20041002