org.xfp.components
Class SMTPHelper

java.lang.Object
  extended byorg.xfp.components.SMTPHelper
All Implemented Interfaces:
org.apache.avalon.framework.parameters.Parameterizable

public class SMTPHelper
extends java.lang.Object
implements org.apache.avalon.framework.parameters.Parameterizable

Helper class for SMTP.

Version:
$Id: SMTPHelper.java,v 1.1 2004/03/19 15:56:43 flaviotordini Exp $
Author:
Flavio Tordini

Nested Class Summary
 class SMTPHelper.MailAuthenticator
          Class for SMTP authentication.
 
Constructor Summary
SMTPHelper()
           
 
Method Summary
 javax.mail.internet.MimeMessage createMessage(java.lang.String from, java.util.List to, java.lang.String subject, java.lang.String data)
          Creates a message.
 javax.mail.Session getSession()
           
 void parameterize(org.apache.avalon.framework.parameters.Parameters parameters)
           
 void sendMessage(javax.mail.Message mail)
          Sends a message.
 java.lang.String toString()
          toString.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SMTPHelper

public SMTPHelper()
Method Detail

toString

public java.lang.String toString()
toString.

Returns:
return

createMessage

public javax.mail.internet.MimeMessage createMessage(java.lang.String from,
                                                     java.util.List to,
                                                     java.lang.String subject,
                                                     java.lang.String data)
                                              throws javax.mail.internet.AddressException,
                                                     javax.mail.MessagingException
Creates a message.

Parameters:
from - Sender address
to - Recipients addresses. List of String
subject - Message subject
data - Message body
Returns:
return The JavaMail message
Throws:
javax.mail.internet.AddressException - exception
javax.mail.MessagingException - exception

sendMessage

public void sendMessage(javax.mail.Message mail)
                 throws javax.mail.MessagingException
Sends a message.

Parameters:
mail - The JavaMail message
Throws:
javax.mail.MessagingException

parameterize

public void parameterize(org.apache.avalon.framework.parameters.Parameters parameters)
                  throws org.apache.avalon.framework.parameters.ParameterException
Specified by:
parameterize in interface org.apache.avalon.framework.parameters.Parameterizable
Throws:
org.apache.avalon.framework.parameters.ParameterException
See Also:
Parameterizable.parameterize(org.apache.avalon.framework.parameters.Parameters)

getSession

public javax.mail.Session getSession()
Returns:
Returns the JavaMail session.


Copyright © 2003-2004 XFP Team. All Rights Reserved.