Email event receiver is an internal event receiver that comes with WSO2 products by default. You can configure it with
Follow the steps below to complete the prerequisites before starting the input receiver configurations.
- Remove any rich text formatting from the email body. It must contain only plain text.
Creating an email event receiver
For instructions on creating an email event receiver, see Configuring Event Receivers.
Configuring global properties
The following global property can be set for
<CEP_HOME>/repository/conf/input-event-adapters.xml file. This property applies to all the receivers of the
|Property Key||Description||Data Type||Default Value|
|The name of the folder in which the events received should be saved. If a folder with the given name does not already exist in the email server, it will be automatically created when events are received by email-receivers.||String|
Configuring adapter properties
Specify the Adapter Properties , when creating an email event receiver using the Management Console as shown below.
After entering the above adapter properties, select the Event Stream to which you want to map the incoming events, and the Message Format which you want to apply on the receiving events . Also, click Advanced to define custom input mappings based on the Message Format you selected. For more information on custom input mapping types, see Input Mapping Types .
You can also define the respective adapter properties of the event receiver based on the transport type within the
<from> element of the event receiver configuration in the
<PRODUCT_HOME>/repository/deployment/server/eventreceivers/ directory as follows.
The above adapter properties are described below.
|Configuration file property||Example|
Receiving Mail Address
A valid mail address from which this service should fetch incoming mails.
|Username of the receiver email account.|
Password of the receiver email account.
|Subject||Only the mails with this subject mentioned will be processed. (The mail should be in plain text format.)|
|Email Input Event Adapter Test|
|Mail Protocol Host||Host address of the mail receiver.|
|Mail Protocol Port||Port of the mail receiver.|
|Mail Protocol||The mail protocol to be used to receive messages. The default value is imap. For imap, make sure it is enabled in your email account settings.|
|Poll Interval (in seconds)||A positive integer which denotes the time limit, in which the product needs to check for new mails.|
For more information on