|
||||||||
| 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)
|
|
| Method Summary | |
|---|---|
Authenticator |
createAuthenticator(String user,
String password)
Helper method to create an Authenticator based on Password Authentication |
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. |
Session |
getSession()
|
protected Category |
log()
|
void |
setDebug(boolean debug)
|
void |
setSession(Session session)
|
| 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
JavaMailerException
public JavaMailer2()
throws JavaMailerException
IOException
JavaMailerException| Method Detail |
|---|
public Authenticator createAuthenticator(String user,
String password)
public MimeBodyPart createFileAttachment(File file)
throws MessagingException,
JavaMailerException
file - file to attach
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)
protected Category log()
public Session getSession()
public void setSession(Session session)
session - the session to setpublic Properties getMailProps()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||