Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Email event adapter is an internal event adaper that comes with WSO2 products by default. It can be configured with XML, text, and JSON input mapping types.

Table of Contents
maxLevel3

Excerpt
hiddentrue

NOTE TO WRITERS: Add the TOC here.

Table of Contents
maxLevel3

Prerequisites

Follow the steps below to complete the prerequisites before starting the input adapter configurations.

  1. Enable the mail transport receiver in Axis2 level by uncommenting the following line in <PRODUCT_HOME>/repository/conf/axi2/axis2.xml file:
    <transportReceiver name="mailto" class="org.apache.axis2.transport.mail.MailTransportListener"/>
  2. Remove any rich text formatting from the email body. It must contain only plain text. 

Configuring input email event adapter

You can configure the email input event adapter using the management console or using a configuration file.

Anchor
Using the management console
Using the management console
Configure using the management console

Follow the instructions below to configure input email event adapter using the management console. This deploys the event adapter in the <PRODUCT_HOME>/

...

  1. Log in to product's management console, and click Configure.
  2. Click Input Event Adaptors in the Event Processor Configs menu, and then click Add Input Event Adaptor.
  3. Enter details as shown in the below example.
    create input email event adapter
    Properties of the above configuration are described below. 

    PropertyDescription
    Event Adaptor NameName of the input event adapter
    Event Adaptor TypeType of the input event adapter
    Receiving Mail AddressMail address, where the product used to retrieve the mails
    Receiving Mail ProtocolCan be either POP or IMAP (If you select IMAP, make sure it is enabled in your email account settings)
    Poll IntervalThe 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 Port995 for POP, and 993 for IMAP
    User NameUsername of the email account
    PasswordUsername of the email account
    Receiving Mail Protocol Port SocketFactory ClassClass of the receiving mail protocol port
    Receiving Mail Protocol SocketFactory FallBackTo enable or disable fallback of the receiving mail protocol class
     
  4. Click  Add Event Adaptor.

Anchor
Using the management console
Using the management console
Configure using a configuration file

Follow the instructions below to configure input email event adapter using a configuration file.

...

Info

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 email.in.subject is 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.

Configuring input email event adapter message properties

The configured input event adapters are used in event builders. With input event adapter message properties, event builders are able to extract data from the incoming events to build the event streams. Following are the specific message properties of the input email event adapter.

...