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.

...

  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 FallBack To enable or disable fallback of the receiving mail protocol class
  4. Click    Add Event Adaptor.

...

  1. Create an XML file with the following input email event adapter configurations. Input event adaptor implementation must start with  <inputEventAdaptor>  as the root element.

    Code Block
    languagehtml/xml
    <inputEventAdaptor name="emailAdaptor" type="email" xmlns="http://wso2.org/carbon/eventadaptormanager">
      <property name="mail.protocol.socketFactory.fallback">false</property>
      <property name="transport.mail.Address">wso2cep@gmail>wso2bam@gmail.com</property>
      <property name="mail.protocol.password">mailpassword</property>
      <property name="mail.protocol.host">pop.gmail.com</property>
      <property name="mail.protocol.port">995</property>
      <property name="mail.protocol.user">wso2cep<>wso2bam</property>
      <property name="transport.PollInterval">5</property>
      <property name="transport.mail.Protocol">pop3</property>
      <property name="mail.protocol.socketFactory.class">javax.net.ssl.SSLSocketFactory</property>
    </inputEventAdaptor>
  2. 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.   

...