Email event receiver is an internal event receiver that comes with WSO2 products by default. You can configure it with XML, text, and JSON input mapping types.
Table of Contents | ||
---|---|---|
|
Prerequisites
Follow the steps below to complete the prerequisites before starting the input receiver configurations.
...
For instructions on creating an email event receiver, see Configuring Event Receivers .
Configuring global properties
The following global property can be set for Email
event receiver type in the <DAS_HOME>/repository/conf/input-event-adapters.xml
file. This property applies to all the receivers of the Email
type. If this property is removed from the file, its default value still applies.
Property Key | Description | Data Type | Default Value |
---|---|---|---|
moveToFolderName | 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 | readMails |
Configuring adapter properties
Specify the Adapter Properties , when creating an email event receiver using the management console as shown below.
...
Adapter property | Description | Configuration file property | Example |
---|---|---|---|
Receiving Mail Address | A valid mail address from which this service should fetch incoming mails. | transport.mail.Address | receiver@gmail.com |
User Name | Username of the receiver email account. | mail.protocol.user | test-user |
Password | Password of the receiver email account. | mail.protocol.password | test-password |
Subject | Only the mails with this subject mentioned will be processed. (The mail should be in plain text format.) | email.in.subject | Email Input Event Adapter Test |
Mail Protocol Host | Host address of the mail receiver. | mail.protocol.host | pop.gmail.com/ imap.gmail.com |
Mail Protocol Port | Port of the mail receiver. | mail.protocol.port | 995/993 |
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. | transport.mail.Protocol | pop3/imap |
Poll Interval (in seconds) | A positive integer which denotes the time limit, in which the product needs to check for new mails. | transport.PollInterval | 10 |
Related samples
For more information on email
event receiver type, see the following sample in WSO2 CEP Documentation.