deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.commons.mail
Class MailHelper

java.lang.Object
  extended by org.deegree.commons.mail.MailHelper

public final class MailHelper
extends Object

A helper class to create and send mail.

Version:
$Revision: 18171 $,$Date: 2009-06-17 16:00:07 +0200 (Mi, 17 Jun 2009) $
Author:
Torsten Friebe , last edited by: $Author: mschneider $
See Also:
Message, MimeMessage

Constructor Summary
MailHelper()
          Creates a mail helper to send a message.
 
Method Summary
 void createAndSendMail(MailMessage eMess, javax.mail.Session session)
          This method creates an email message and sends it using the J2EE mail services
 void createAndSendMail(MailMessage eMess, javax.mail.Session session, File[] files, String[] mimeType)
          This method creates an email message and sends it using the J2EE mail services
 void createAndSendMail(MailMessage eMess, javax.mail.Session session, Object[] attachment, String[] mimeType)
          This method creates an email message and sends it using the J2EE mail services
static void createAndSendMail(MailMessage eMess, String mailHost)
          This method creates an email message and sends it using the J2EE mail services
static void createAndSendMail(MailMessage eMess, String mailHost, File[] files, String[] mimeType)
          This method creates an email message and sends it using the J2EE mail services
static void createAndSendMail(MailMessage eMess, String mailHost, Object[] attachment, String[] mimeType)
          This method creates an email message and sends it using the J2EE mail services
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailHelper

public MailHelper()
Creates a mail helper to send a message.

Method Detail

createAndSendMail

public static void createAndSendMail(MailMessage eMess,
                                     String mailHost)
                              throws SendMailException
This method creates an email message and sends it using the J2EE mail services

Parameters:
eMess - a email message
mailHost - name of the SMTP host
Throws:
SendMailException - an exception if the message is undeliverable

createAndSendMail

public static void createAndSendMail(MailMessage eMess,
                                     String mailHost,
                                     Object[] attachment,
                                     String[] mimeType)
                              throws SendMailException
This method creates an email message and sends it using the J2EE mail services

Parameters:
eMess - a email message
mailHost - name of the SMTP host
attachment - Object to attach to a mail
mimeType - mimetype of the attchment
Throws:
SendMailException

createAndSendMail

public static void createAndSendMail(MailMessage eMess,
                                     String mailHost,
                                     File[] files,
                                     String[] mimeType)
                              throws SendMailException
This method creates an email message and sends it using the J2EE mail services

Parameters:
eMess - a email message
mailHost - name of the SMTP host
files - files to attach to a mail
mimeType - mimetype of the attchment
Throws:
SendMailException

createAndSendMail

public void createAndSendMail(MailMessage eMess,
                              javax.mail.Session session)
                       throws SendMailException
This method creates an email message and sends it using the J2EE mail services

Parameters:
eMess - a email message
session -
Throws:
SendMailException - an exception if the message is undeliverable
See Also:
Transport, J2EE Mail Session connection

createAndSendMail

public void createAndSendMail(MailMessage eMess,
                              javax.mail.Session session,
                              Object[] attachment,
                              String[] mimeType)
                       throws SendMailException
This method creates an email message and sends it using the J2EE mail services

Parameters:
eMess - an email message
session -
attachment - Object to attach to a mail
mimeType - mimetype of the attchment
Throws:
SendMailException - an exception if the message is undeliverable

createAndSendMail

public void createAndSendMail(MailMessage eMess,
                              javax.mail.Session session,
                              File[] files,
                              String[] mimeType)
                       throws SendMailException
This method creates an email message and sends it using the J2EE mail services

Parameters:
eMess - an email message
session -
files - files to attach to a mail
mimeType - mimetype of the attchment
Throws:
SendMailException - an exception if the message is undeliverable

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>