|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsteve.pums.assess.process.EmailService
public class EmailService
Used for constructing and sending email messages from the SUMS marking system
Constructor Summary | |
---|---|
EmailService(java.sql.Connection conn)
Creates a new instance of EmailService |
Method Summary | |
---|---|
void |
sendEmail(int[] to,
java.lang.String messageKey,
java.util.Map messageArgs)
Sends an email with standardised subject and sender, loaded from application properties |
void |
sendEmail(int[] to,
java.lang.String from,
java.lang.String messageKey,
java.lang.String messageSubject,
java.util.Map messageArgs)
Sends an email with the specified parameters |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EmailService(java.sql.Connection conn)
conn
- Connection to the SUMS databaseMethod Detail |
---|
public void sendEmail(int[] to, java.lang.String from, java.lang.String messageKey, java.lang.String messageSubject, java.util.Map messageArgs) throws jim.common.JimFatalException, java.sql.SQLException, javax.mail.MessagingException
to
- array of person ids to send the email tofrom
- email address of sendermessageKey
- identifier of the email template held in the SUMS databasemessageSubject
- email subjectmessageArgs
- values to insert in to the email template
jim.common.JimFatalException
- as a result of error in DB fetcher
java.sql.SQLException
- as a result of an error in the address lookup
javax.mail.MessagingException
- as a result of error in email sendingpublic void sendEmail(int[] to, java.lang.String messageKey, java.util.Map messageArgs) throws jim.common.JimFatalException, java.sql.SQLException, javax.mail.MessagingException
to
- array of person ids to send the email tomessageKey
- identifier of the email template held in the SUMS databasemessageArgs
- values to insert in to the email template
jim.common.JimFatalException
- as a result of error in DB fetcher
java.sql.SQLException
- as a result of an error in the address lookup
javax.mail.MessagingException
- as a result of error in email sending
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |