|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.rice.kew.mail.Mailer
public class Mailer
Maintains a Java Mail session and can be used for sending emails.
| Field Summary | |
|---|---|
protected org.apache.log4j.Logger |
LOG
|
| Constructor Summary | |
|---|---|
Mailer(Properties configProperties)
|
|
Mailer(Properties configProperties,
javax.mail.Authenticator authenticator)
Create a AuthenticatedMailer with the default values for authenticated use of mail-relay.iu.edu. |
|
Mailer(Properties configProperties,
String username,
String password)
|
|
| Method Summary | |
|---|---|
javax.mail.Authenticator |
getAuthenticator()
|
Properties |
getConfig()
|
javax.mail.Session |
getCurrentSession()
This allows direct access to the Mail Session. |
void |
sendMessage(String sender,
javax.mail.Address[] recipients,
String subject,
String messageBody,
javax.mail.Address[] ccRecipients,
javax.mail.Address[] bccRecipients,
boolean htmlMessage)
Sends an email to the given recipients. |
void |
sendMessage(String sender,
String recipient,
String subject,
String messageBody,
boolean htmlMessage)
Send a message to the designated recipient with the specified subject and message. |
void |
setConfig(Properties configProperties)
A method to configure the Mailer properties. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.apache.log4j.Logger LOG
| Constructor Detail |
|---|
public Mailer(Properties configProperties,
javax.mail.Authenticator authenticator)
senderAddress - return address for the mail being sentkbPrincipleName - kerberos principle name used to authenticate to mail-relaykbPrinciplePassword - kerberos principle password used to authenticate to mail-relaypublic Mailer(Properties configProperties)
public Mailer(Properties configProperties,
String username,
String password)
| Method Detail |
|---|
public void setConfig(Properties configProperties)
mailConfigProperties - Proeprties object containing configuration information
public void sendMessage(String sender,
javax.mail.Address[] recipients,
String subject,
String messageBody,
javax.mail.Address[] ccRecipients,
javax.mail.Address[] bccRecipients,
boolean htmlMessage)
throws javax.mail.internet.AddressException,
javax.mail.MessagingException
recipients - list of addresses to which the message is sentsubject - subject of the messagemessageBody - body of the messageccRecipients - list of addresses which are to be cc'd on the messagebccRecipients - list of addresses which are to be bcc'd on the message
javax.mail.internet.AddressException
javax.mail.MessagingException
public void sendMessage(String sender,
String recipient,
String subject,
String messageBody,
boolean htmlMessage)
throws javax.mail.internet.AddressException,
javax.mail.MessagingException
recipient - the email address to which the message is sentsubject - subject for the messagemessageBody - body of the message to to be sentccRecipient - email address of a cc recipient
javax.mail.internet.AddressException
javax.mail.MessagingExceptionpublic Properties getConfig()
public javax.mail.Authenticator getAuthenticator()
public javax.mail.Session getCurrentSession()
throws javax.mail.NoSuchProviderException
javax.mail.NoSuchProviderException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||