|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.javamail.JavaMailer2
public abstract class JavaMailer2
Sends an email message using the Java Mail API
| Nested Class Summary | |
|---|---|
static class |
JavaMailer2.LoggingByteArrayOutputStream
|
static class |
JavaMailer2.LoggingTransportListener
|
| Constructor Summary | |
|---|---|
JavaMailer2()
Default constructor. |
|
JavaMailer2(Properties javamailProps)
Constructor for JavaMailer2. |
|
| Method Summary | |
|---|---|
javax.mail.Authenticator |
createAuthenticator(String user,
String password)
Helper method to create an Authenticator based on Password Authentication |
javax.mail.internet.MimeBodyPart |
createFileAttachment(File file)
Create a file attachment as a MimeBodyPart, checking to see if the file exists before we create the attachment. |
Properties |
getMailProps()
This returns the properties configured in the javamail-configuration.properties file. |
javax.mail.Session |
getSession()
getSession |
protected static ThreadCategory |
log()
log |
void |
setDebug(boolean debug)
setDebug |
void |
setSession(javax.mail.Session session)
setSession |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JavaMailer2(Properties javamailProps)
throws JavaMailerException
Constructor for JavaMailer2.
javamailProps - a Properties object.
JavaMailerException - if any.
public JavaMailer2()
throws JavaMailerException
IOException - if any.
JavaMailerException - if any.| Method Detail |
|---|
public javax.mail.Authenticator createAuthenticator(String user,
String password)
user - a String object.password - a String object.
Authenticator object.
public javax.mail.internet.MimeBodyPart createFileAttachment(File file)
throws javax.mail.MessagingException,
JavaMailerException
file - file to attach
javax.mail.MessagingException - if we can't set the data handler or
the file name on the MimeBodyPart
JavaMailerException - if the file does not exist or is not
readablepublic void setDebug(boolean debug)
setDebug
debug - a boolean.protected static ThreadCategory log()
log
public javax.mail.Session getSession()
getSession
public void setSession(javax.mail.Session session)
setSession
session - the session to setpublic Properties getMailProps()
Properties object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||