org.mmbase.module
Class SendMail

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

public class SendMail
extends AbstractSendMail

This module provides mail functionality

Version:
$Id: SendMail.java,v 1.13.2.1 2004/07/08 10:10:19 marcel Exp $
Author:
Rob Vermeulen, Johannes Verelst

Constructor Summary
SendMail()
           
 
Method Summary
 void cleanClose(java.lang.String answer, java.lang.String from, java.lang.String to)
          Something went wrong, log the error and close the socket with a 'QUIT'.
 java.util.List expand(java.lang.String name)
          gives all the members of a mailinglist
 java.lang.String getModuleInfo()
          provide some info on the module
 java.lang.String getStateInfo(java.lang.String line)
           
 void init()
          Initializes the module.
 void reload()
           
 boolean sendMail(java.lang.String from, java.lang.String to, java.lang.String data, java.util.Map headers)
          Send mail.
 void shutdown()
          Shuts down the module.
 void unload()
           
 java.lang.String verify(java.lang.String name)
          checks the e-mail address
 
Methods inherited from class org.mmbase.module.AbstractSendMail
onload, sendMail, sendMail
 
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, shutdownModules, startModule, startModules, state
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SendMail

public SendMail()
Method Detail

reload

public void reload()

unload

public void unload()

shutdown

public void shutdown()
Description copied from class: Module
Shuts down the module. This method is called by shutdownModules.

Overrides:
shutdown in class Module

init

public void init()
Description copied from class: Module
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

sendMail

public boolean sendMail(java.lang.String from,
                        java.lang.String to,
                        java.lang.String data,
                        java.util.Map headers)
Send mail.
 The conversation goes as follows:
 Client: MAIL FROM: <fromaddress>
 Server: 250 OK
 Client: RCPT TO: <toaddress>
 Server: 250 OK
 Client: DATA
 Server: 354 Start mail input; end with <CRLF>.<CRLF>
 Client: all data
 Client: .
 Server: 250 OK
 Client: QUIT
 Server: <closes connection>
 


cleanClose

public void cleanClose(java.lang.String answer,
                       java.lang.String from,
                       java.lang.String to)
Something went wrong, log the error and close the socket with a 'QUIT'.


getModuleInfo

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

Overrides:
getModuleInfo in class Module

getStateInfo

public java.lang.String getStateInfo(java.lang.String line)

verify

public java.lang.String verify(java.lang.String name)
checks the e-mail address

Specified by:
verify in interface SendMailInterface
Overrides:
verify in class AbstractSendMail

expand

public java.util.List expand(java.lang.String name)
gives all the members of a mailinglist

Specified by:
expand in interface SendMailInterface
Overrides:
expand in class AbstractSendMail


MMBase build 1.7.1.20041002