Configuring E-mail Broker
E-mail broker can be used to publish e-mail notification via a configured e-mail account. This uses Axis2 Mail Transport when sending mails from CEP.
To configure the e-mail account edit the <CEP_HOME>/repository/conf/axis2/axis2_client.xml by updating email-address, user-name, password and other relevant property values from the MailTransportSender.
<axisconfig name="AxisJava2.0"> ... <transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender"> <parameter name="mail.smtp.from">email-address</parameter> <parameter name="mail.smtp.user">user-name</parameter> <parameter name="mail.smtp.password">password</parameter> <parameter name="mail.smtp.host">smtp.gmail.com</parameter> <parameter name="mail.smtp.port">587</parameter> <parameter name="mail.smtp.starttls.enable">true</parameter> <parameter name="mail.smtp.auth">true</parameter> </transportSender> ... ... </axisconfig>
Configuring through the User Interface
1. Log on to the product's management console and select "Broker -> Add" in the "Configuration" menu.
2. The "Create a New Broker" window opens using which new broker configurations can be added.
For example, enter the following details to create a E-mail broker.
Broker Name : emailBroker Broker Type : e-mail
3. Click the "Add Broker" button once done. The "Available Brokers" page will open, which allows you to view the broker configurations by clicking on the broker name and delete brokers by clicking on "Delete" button.
Configuring through Configuration
Broker management configuration can be specified in the <CEP_HOME>/repository/conf/broker-manager-config.xml file, whose configurations are loaded at server start-up.
1. Open the file and enter the following E-mail broker configurations inside the "brokerManagerConfiguration" element.
<brokerManagerConfiguration> .. <brokerConfiguraton name="emailBroker" type="e-mail"/> .. .. </brokerManagerConfiguration>
Configuring topics for E-mail broker
The topic used when using e-mail broker will look like : <e-mail id>,<e-mail id>,...,<e-mail id>/<subject>
E.g. admin@foo.com,user@bar.com/ System Notification
Input/Output mapping supported by E-mail Broker
As e-mail broker can only be used to send email notifications, when configuring e-mail broker it can only added with Text output mapping or XML output mapping of a query.
Copyright © WSO2 Inc. 2005-2014