Email event publisher is used to publish events in XML, JSON or text formats via email transports.
Follow the steps below to complete the prerequisites before starting the event publisher configurations.
Edit the email address, username, password and other relevant properties in the
<PRODUCT_HOME>/repository/conf/output-event-adapters.xml file, to point the mail transport sender which is enabled by default in the product, to a valid SMTP configuration as shown in the example below.
- In gmail account security settings you may have to enable "Allow less secure apps" option in order to connect account to WSO2 products.
- When SMTP is used with SSL, it is required to extract the certificate of the email server and add it to the trust store of WSO2 DAS. For detailed instructions, see Creating New Keystores - Adding the public key to client-truststore.jks.
Creating an email event publisher
For instructions on creating an email event publisher, see Creating Alerts.
Configuring adapter properties
Specify the Dynamic Adapter Properties, when creating an email event publisher using the management console as shown below.
After entering the above adapter properties, select the Message Format which you want to apply on the published events . Also, click Advanced to define custom output mappings based on the Message Format you selected. For more information on custom output mapping types, see Output Mapping Types.
<to>element of the event publisher configuration in the
<PRODUCT_HOME>/repository/deployment/server/eventpublishers/directory as follows.
The above adapter properties are described below.
|Configuration file property||Example|
|Email Address||Email address of the client. Register the publisher for multiple email IDs' by separating them with commas.|
|Subject||Subject of the email to be sent to the defined email address.|
This is a test mail.
The email format to be sent to the defined email address.
If you select
For more information on