|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.soa.esb.notification.NotificationTarget org.jboss.soa.esb.notification.NotifyEmail
public class NotifyEmail
This class will send an e-mail using the Email class.
Example configuration:
<target class="NotifyEmail"
host=”localhost”
port=”8801"
username=”smtpUsername"
password=”smtpPassword"
auth=”true"
from=”person@somewhere.com”
sendTo=”person@elsewhere.com”
subject=”theSubject”>
msgAttachmentName=”theSubject”>
<attachment>attachThisFile.txt</attachment>
</target>
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.Author: Heuristica - Buenos Aires - Argentina
Field Summary |
---|
Fields inherited from class org.jboss.soa.esb.notification.NotificationTarget |
---|
m_oParms, PRM_NOTIF_CLASS |
Constructor Summary | |
---|---|
NotifyEmail(ConfigTree configTree)
Instantiate a NotifyEmail object using the information contained in <arg 1> |
|
NotifyEmail(ConfigTree config,
Emailer emailer)
|
Method Summary | |
---|---|
protected void |
overrideSmtpProperties(Message message,
ConfigTree configTree)
Deprecated. Use Emailer.overrideSmtpProperties(Message, ConfigTree) instead |
protected void |
sendEmailNotification(ConfigTree messageParams,
byte[] msgPayload)
Send an email notification based on the supplied parameters. |
void |
sendNotification(Message message)
Send an Email using Email() using p_o.toString() to fill in the message text |
Methods inherited from class org.jboss.soa.esb.notification.NotificationTarget |
---|
fromParams |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NotifyEmail(ConfigTree configTree) throws ConfigurationException
configTree
- ConfigTree - See attributes and structure needed for the
Email() constructor - The MESSAGE attribute will be filled in
at sendNotification(Serializable) time
ConfigurationException
sendNotification(Message)
public NotifyEmail(ConfigTree config, Emailer emailer)
Method Detail |
---|
public void sendNotification(Message message) throws NotificationException
sendNotification
in class NotificationTarget
message
- Object - This object's toString() method will supply contents
of mail message
NotificationException
- -
invoke Exception.getMessage() at runtime for this objectConfigTree
protected void overrideSmtpProperties(Message message, ConfigTree configTree)
Emailer.overrideSmtpProperties(Message, ConfigTree)
instead
message
- The ESB Message object that contains the overrides in its properties.configTree
- The configTree the properties on the ESB Message object will override.protected void sendEmailNotification(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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |