deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.framework.mail
Class MailHelper

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

public final class MailHelper
extends java.lang.Object

A helper class to create and send mail.

Version:
$Revision: 18195 $,$Date: 2009-06-18 17:55:39 +0200 (Do, 18 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, java.io.File[] files, java.lang.String[] mimeType)
          This method creates an email message and sends it using the J2EE mail services
 void createAndSendMail(MailMessage eMess, javax.mail.Session session, java.lang.Object[] attachment, java.lang.String[] mimeType)
          This method creates an email message and sends it using the J2EE mail services
 void createAndSendMail(MailMessage eMess, javax.mail.Session session, java.lang.String mailHostUser, java.lang.String mailHostPassword)
          This method creates an email message and sends it using the J2EE mail services
static void createAndSendMail(MailMessage eMess, java.lang.String mailHost)
          This method creates an email message and sends it using the J2EE mail services
static void createAndSendMail(MailMessage eMess, java.lang.String mailHost, java.io.File[] files, java.lang.String[] mimeType)
          This method creates an email message and sends it using the J2EE mail services
static void createAndSendMail(MailMessage eMess, java.lang.String mailHost, java.io.File[] files, java.lang.String[] mimeType, java.lang.String mailHostUser, java.lang.String mailHostPassword)
          This method creates an email message and sends it using the J2EE mail services
static void createAndSendMail(MailMessage eMess, java.lang.String mailHost, java.lang.Object[] attachment, java.lang.String[] mimeType)
          This method creates an email message and sends it using the J2EE mail services
static void createAndSendMail(MailMessage eMess, java.lang.String mailHost, java.lang.Object[] attachment, java.lang.String[] mimeType, java.lang.String mailHostUser, java.lang.String mailHostPassword)
          This method creates an email message and sends it using the J2EE mail services
static void createAndSendMail(MailMessage eMess, java.lang.String mailHost, java.lang.String mailHostUser, java.lang.String mailHostPassword)
          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,
                                     java.lang.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,
                                     java.lang.String mailHost,
                                     java.lang.String mailHostUser,
                                     java.lang.String mailHostPassword)
                              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
mailHostUser - user name for mail host
mailHostPassword - password of user
Throws:
SendMailException - an exception if the message is undeliverable

createAndSendMail

public static void createAndSendMail(MailMessage eMess,
                                     java.lang.String mailHost,
                                     java.lang.Object[] attachment,
                                     java.lang.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,
                                     java.lang.String mailHost,
                                     java.lang.Object[] attachment,
                                     java.lang.String[] mimeType,
                                     java.lang.String mailHostUser,
                                     java.lang.String mailHostPassword)
                              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
mailHostUser - user name for mail host
mailHostPassword - password of user
Throws:
SendMailException

createAndSendMail

public static void createAndSendMail(MailMessage eMess,
                                     java.lang.String mailHost,
                                     java.io.File[] files,
                                     java.lang.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 static void createAndSendMail(MailMessage eMess,
                                     java.lang.String mailHost,
                                     java.io.File[] files,
                                     java.lang.String[] mimeType,
                                     java.lang.String mailHostUser,
                                     java.lang.String mailHostPassword)
                              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
mailHostUser -
mailHostPassword -
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,
                              java.lang.String mailHostUser,
                              java.lang.String mailHostPassword)
                       throws SendMailException
This method creates an email message and sends it using the J2EE mail services

Parameters:
eMess - a email message
session -
mailHostUser -
mailHostPassword -
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,
                              java.lang.Object[] attachment,
                              java.lang.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,
                              java.io.File[] files,
                              java.lang.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 2.5 (2011/06/29 09:44 build-8-official)

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