|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.javamail.JavaMailer2
org.opennms.javamail.JavaSendMailer
public class JavaSendMailer
Use this class for sending emailz. Crude extension of JavaMailer TODO: Improve class hierarchy. TODO: Needs testing
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.opennms.javamail.JavaMailer2 |
|---|
JavaMailer2.LoggingByteArrayOutputStream, JavaMailer2.LoggingTransportListener |
| Constructor Summary | |
|---|---|
JavaSendMailer(SendmailConfig config)
Using this constructor implies overriding sendmail configuration with properties from the deprecated javamail-configuration.properties file. |
|
JavaSendMailer(SendmailConfig config,
boolean useJmProps)
Constructs everything required to call send() |
|
| Method Summary | |
|---|---|
org.springframework.mail.javamail.MimeMailMessage |
buildMimeMessage(SendmailMessage msg)
buildMimeMessage |
javax.mail.Authenticator |
createAuthenticator()
Helper method to create an Authenticator based on Password Authentication |
SendmailConfig |
getConfig()
getConfig |
org.springframework.mail.javamail.MimeMailMessage |
getMessage()
getMessage |
Properties |
getProperties()
getProperties |
void |
send()
send |
void |
setConfig(SendmailConfig config)
setConfig |
void |
setMessage(org.springframework.mail.javamail.MimeMailMessage message)
setMessage |
void |
setProperties(Properties properties)
setProperties |
| Methods inherited from class org.opennms.javamail.JavaMailer2 |
|---|
createAuthenticator, createFileAttachment, getMailProps, getSession, log, setDebug, setSession |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JavaSendMailer(SendmailConfig config,
boolean useJmProps)
throws JavaMailerException
config - SendmailConfiguseJmProps - A boolean representing the handling of the deprecated javamail-configuration.properties file.
JavaMailerException - if any.
public JavaSendMailer(SendmailConfig config)
throws JavaMailerException
config - a SendmailConfig object.
JavaMailerException - if any.| Method Detail |
|---|
public org.springframework.mail.javamail.MimeMailMessage buildMimeMessage(SendmailMessage msg)
buildMimeMessage
msg - a SendmailMessage object.
MimeMailMessage object.public javax.mail.Authenticator createAuthenticator()
Authenticator object.
public void send()
throws JavaMailerException
send
JavaMailerException - if any.public void setConfig(SendmailConfig config)
setConfig
config - a SendmailConfig object.public SendmailConfig getConfig()
getConfig
SendmailConfig object.public void setMessage(org.springframework.mail.javamail.MimeMailMessage message)
setMessage
message - a MimeMailMessage object.public org.springframework.mail.javamail.MimeMailMessage getMessage()
getMessage
MimeMailMessage object.public void setProperties(Properties properties)
setProperties
properties - a Properties object.public Properties getProperties()
getProperties
Properties object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||