|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nih.nci.caarray.util.EmailUtil
public final class EmailUtil
Utility class that sends emails. Email configuration is retrieved from the application server settings using a JNDI lookup.
Method Summary | |
---|---|
javax.mail.Session |
getMailSession()
Returns a handle on the populated mail session object. |
static void |
sendMail(java.util.List<java.lang.String> mailRecipients,
java.lang.String from,
java.lang.String mailSubject,
java.lang.String mailBody)
Sends mail based upon input parameters. |
static void |
sendMultipartMail(java.util.List<java.lang.String> mailRecipients,
java.lang.String from,
java.lang.String mailSubject,
java.lang.String htmlMailBody,
java.lang.String plainMailBody)
Sends a multipart email with both HTML and plain-text bodies based upon input parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public javax.mail.Session getMailSession()
public static void sendMail(java.util.List<java.lang.String> mailRecipients, java.lang.String from, java.lang.String mailSubject, java.lang.String mailBody) throws javax.mail.MessagingException
mailRecipients
- List of strings that are the recipient email addressesfrom
- the from of the emailmailSubject
- the subject of the emailmailBody
- the body of the email
javax.mail.MessagingException
- thrown if there is a problem sending the messagepublic static void sendMultipartMail(java.util.List<java.lang.String> mailRecipients, java.lang.String from, java.lang.String mailSubject, java.lang.String htmlMailBody, java.lang.String plainMailBody) throws javax.mail.MessagingException
mailRecipients
- List of strings that are the recipient email addressesfrom
- the from of the emailmailSubject
- the subject of the emailhtmlMailBody
- the HTML version of the body of the emailplainMailBody
- the plain-text version of the body of the email
javax.mail.MessagingException
- thrown if there is a problem sending the message
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |