Email event adapter is an internal event adapter that comes with WSO2 products by default. It can be configured with
Follow the steps below to complete the prerequisites before starting the input adapter configurations.
<transportReceiver name="mailto" class="org.apache.axis2.transport.mail.MailTransportListener"/>
Follow the instructions below to configure input email event adapter using the management console. This deploys the event adapter in the
Enter details as shown in the below example.
Properties of the above configuration are described below.
|Event Adaptor Name||Name of the input event adapter|
|Event Adaptor Type||Type of the input event adapter|
|Receiving Mail Address||Mail address, where the product used to retrieve the mails|
|Receiving Mail Protocol||Can be either POP or IMAP (If you select IMAP, make sure it is enabled in your email account settings)|
|Poll Interval||The time limit, in which the product needs to check for new mails|
|Receiving Mail Protocol Host:||pop.gmail.com for POP, and imap.gmail.com for IMAP|
|Receiving Mail Protocol Port||995 for POP, and 993 for IMAP|
|User Name||Username of the email account|
|Password||Username of the email account|
|Receiving Mail Protocol Port SocketFactory Class||Class of the receiving mail protocol port|
|Receiving Mail Protocol SocketFactory FallBack||To enable or disable fallback of the receiving mail protocol class|
Follow the instructions below to configure input email event adapter using a configuration file.
Create an XML file with the following input email event adapter configurations. Input event adaptor implementation must start with
<inputEventAdaptor> as the root element.
Add the XML file to the
<PRODUCT_HOME>/repository/deployment/server/inputeventadaptors/ directory. Since hot deployment is enabled, you can simply add/remove files to deploy/undeploy to/from the server.
If there is any exception occurred continuously when sending mail, check whether
email.in.subject matches with email subject that we send. (For example: If
TestMail then subect of the mail needs to be
SOAPAction :urn:TestMail. If the issue still continues, try removing service-meta files in the deployment directory.
Click the name of the event builder to which the relevant input event adapter is connected. This opens the Event Builder Details page.
The message properties of an
|Email Service Name||For an email to be processed through this event builder, the subject must be |
|Input Mapping Type||The incoming event type to be mapped.|