|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.soa.esb.actions.routing.email.Emailer
public class Emailer
General Emailer used for both notifiations and router.
This code was lifted fromNotifyEmail.
Configuration properties:
host The host name of the SMTP server. If not specified will default to the property 'org.jboss.soa.esb.mail.smtp.host' in jbossesb-properties.xml. port The port for the SMTP server. If not specified will default to the property 'org.jboss.soa.esb.mail.smtp.port' in jbossesb-properties.xml.username The username for the SMTP server. If not specified will default to the property 'org.jboss.soa.esb.mail.smtp.user' in jbossesb-properties.xml.password The password for the above username on the SMTP server. If not specified will default to the property 'org.jboss.soa.esb.mail.smtp.password' in jbossesb-properties.xml username The username for the SMTP server. If not specified will default to the property 'org.jboss.soa.esb.mail.smtp.user' in jbossesb-properties.xml auth If true will attempt to authenticate the user using the AUTH command. If not specified will default to the property 'org.jboss.soa.esb.mail.smtp.auth' in jbossesb-properties.xml msgAttachmentName filename of an attachment containing the message payload (optional). If not specified the message payload will be included in the message body.
| Constructor Summary | |
|---|---|
Emailer(ConfigTree config)
|
|
| Method Summary | |
|---|---|
static void |
overrideSmtpProperties(Message message,
ConfigTree configTree)
Allows smtp overrides by setting properties on the passed-in message. |
protected void |
sendEmail(ConfigTree messageParams,
byte[] msgPayload)
Send an email notification based on the supplied parameters. |
void |
sendEmail(ConfigTree config,
java.lang.Object obj)
Send an Email using Email() using p_o.toString() to fill in the message text |
void |
sendEmail(Message message)
Send an Email using Email() using p_o.toString() to fill in the message text |
void |
sendEmail(java.lang.Object obj)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Emailer(ConfigTree config)
throws ConfigurationException
ConfigurationException| Method Detail |
|---|
public void sendEmail(Message message)
throws MessageDeliverException
message - Object - This object's toString() method will supply contents
of mail message
MessageDeliverException
public void sendEmail(java.lang.Object obj)
throws MessageDeliverException
MessageDeliverException
public void sendEmail(ConfigTree config,
java.lang.Object obj)
throws MessageDeliverException
message - Object - This object's toString() method will supply contents
of mail message
MessageDeliverException
protected void sendEmail(ConfigTree messageParams,
byte[] msgPayload)
throws javax.mail.internet.AddressException,
javax.mail.MessagingException,
java.io.IOException
messageParams - Message parameters.message -
java.io.IOException
javax.mail.internet.AddressException
javax.mail.MessagingException
public static void overrideSmtpProperties(Message message,
ConfigTree configTree)
message - The ESB Message object that contains the overrides in its properties.configTree - The configTree the properties on the ESB Message object will override.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||