org.ploin.pmf.impl
Class MailSender

java.lang.Object
  extended by org.ploin.pmf.impl.MailSender
All Implemented Interfaces:
Serializable, IMailSender

public class MailSender
extends Object
implements Serializable, IMailSender

Description: Implementation of the IMailSender interface. This class is responsible to send the e-mails.

$LastChangedBy: r.reiz $
$Revision: 77 $
$Date: 2010-03-15 13:13:45 +0100 (Mon, 15 Mar 2010) $

See Also:
Serialized Form

Constructor Summary
MailSender()
           
 
Method Summary
 IPropertiesLoader getPropertiesLoader()
           
 SendingResult sendMail(String plain, String html, MailConfig mailConfig, ServerConfig serverConfig, Map<String,String> map)
          This method sends the mail.
 void setPropertiesLoader(IPropertiesLoader propertiesLoader)
          Set the ProperitesLoader which should be used to read properties from the config files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailSender

public MailSender()
Method Detail

sendMail

public SendingResult sendMail(String plain,
                              String html,
                              MailConfig mailConfig,
                              ServerConfig serverConfig,
                              Map<String,String> map)
                       throws MailFactoryException
Description copied from interface: IMailSender
This method sends the mail.

Specified by:
sendMail in interface IMailSender
Parameters:
plain - - the plain mail message.
html - - the html mail message.
mailConfig - - the mail config object.
serverConfig - - the server config object.
map - - the map containing embeds and attachements
Returns:
An Object array with two elements. The first Element is the String given back by the commons-email API email.send(). The second Element is the send mail as MimeMessage.
Throws:
MailFactoryException

getPropertiesLoader

public IPropertiesLoader getPropertiesLoader()
Specified by:
getPropertiesLoader in interface IMailSender
Returns:
the PropertiesLoader used to read the config properties file.

setPropertiesLoader

public void setPropertiesLoader(IPropertiesLoader propertiesLoader)
Description copied from interface: IMailSender
Set the ProperitesLoader which should be used to read properties from the config files.

Specified by:
setPropertiesLoader in interface IMailSender
Parameters:
propertiesLoader - - the new PropertiesLoader


Copyright © 2012 PLOIN GmbH. All Rights Reserved.