|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.appfuse.util.MailUtil
Utility class to send e-mail.
| Constructor Summary | |
MailUtil()
|
|
| Method Summary | |
static Session |
getSession()
Retrieves a Mail session from Tomcat's Resource Factory (JNDI) |
static void |
sendHTMLMessage(String from,
String[] to,
String[] cc,
String subject,
String content)
This method is used to send a HTML Message |
static void |
sendHTMLMessage(String from,
String to,
String cc,
String subject,
String content)
This method overrides the sendHTMLMessage to specify only one sender, rather than an array of senders. |
static void |
sendMessage(String from,
String[] to,
String[] cc,
String subject,
String content,
String mimeType)
This method is used to send a Message with a pre-defined mime-type. |
static void |
sendMessage(String from,
String to,
String cc,
String subject,
String content,
String mimeType)
This method allows you to specify the mimeType as part of the method call. |
static void |
sendMessage(String from,
String to,
String cc,
String subject,
String content,
String mimeType,
File attachment)
Convenience method for sending messages with attachments. |
static void |
sendMessageWithAttachment(String from,
String[] to,
String[] cc,
String subject,
String content,
String mimeType,
File attachment)
This method is used to send a Message with an attachment. |
static void |
sendTextMessage(String from,
String[] to,
String[] cc,
String subject,
String content)
This method is used to send a Text Message. |
static void |
sendTextMessage(String from,
String to,
String cc,
String subject,
String content)
This method overrides the sendTextMessage to specify only one sender, rather than an array of senders. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MailUtil()
| Method Detail |
public static Session getSession()
public static void sendMessageWithAttachment(String from,
String[] to,
String[] cc,
String subject,
String content,
String mimeType,
File attachment)
throws MessagingException
from - e-mail address of senderto - e-mail address(es) of recipientssubject - subject of e-mailcontent - the body of the e-mailmimeType - type of message, i.e. text/plain or text/html
MessagingException - the exception to indicate failure
public static void sendMessage(String from,
String[] to,
String[] cc,
String subject,
String content,
String mimeType)
throws MessagingException
from - e-mail address of senderto - e-mail address(es) of recipientssubject - subject of e-mailcontent - the body of the e-mailmimeType - type of message, i.e. text/plain or text/html
MessagingException - the exception to indicate failure
public static void sendTextMessage(String from,
String[] to,
String[] cc,
String subject,
String content)
throws MessagingException
from - e-mail address of senderto - e-mail addresses of recipientssubject - subject of e-mailcontent - the body of the e-mail
MessagingException - the exception to indicate failure
public static void sendTextMessage(String from,
String to,
String cc,
String subject,
String content)
throws MessagingException
from - e-mail address of senderto - e-mail address of recipientssubject - subject of e-mailcontent - the body of the e-mail
MessagingException - the exception to indicate failure
public static void sendMessage(String from,
String to,
String cc,
String subject,
String content,
String mimeType)
throws MessagingException
MessagingException
public static void sendMessage(String from,
String to,
String cc,
String subject,
String content,
String mimeType,
File attachment)
throws MessagingException
MessagingException
public static void sendHTMLMessage(String from,
String[] to,
String[] cc,
String subject,
String content)
throws MessagingException
from - e-mail address of senderto - e-mail address(es) of recipientssubject - subject of e-mailcontent - the body of the e-mail
MessagingException - the exception to indicate failure
public static void sendHTMLMessage(String from,
String to,
String cc,
String subject,
String content)
throws MessagingException
from - e-mail address of senderto - e-mail address of recipientssubject - subject of e-mailcontent - the body of the e-mail
MessagingException - the exception to indicate failure
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||