Thursday, September 8, 2016

How to Receive Emails to WSO2 ESB

  1. Uncomment below line in <ESB_HOME>/repository/conf/axis2/axis2.xml/axis2.xml to enable Email transport listener.
     <transportReceiver name="mailto" class="org.apache.axis2.transport.mail.MailTransportListener">  
  3. Restart WSO2 ESB if has already started.
  4. Log in to Management console and add below proxy. 
  5. Here, proxy transport type is mailto. The mailto transport supports sending messages (E-Mail) over SMTP and receiving messages over POP3 or IMAP.
     <?xml version="1.0" encoding="UTF-8"?>  
     <proxy xmlns=""  
          <log level="custom">  
           <property expression="$trp:Subject" name="Subject"/>  
       <parameter name="transport.PollInterval">5</parameter>  
       <parameter name=""></parameter>  
       <parameter name="mail.pop3.password">wso2pass</parameter>  
       <parameter name="mail.pop3.user">wso2user</parameter>  
       <parameter name="mail.pop3.socketFactory.port">995</parameter>  
       <parameter name="transport.mail.ContentType">text/plain</parameter>  
       <parameter name="mail.pop3.port">995</parameter>  
       <parameter name="mail.pop3.socketFactory.fallback">false</parameter>  
       <parameter name="transport.mail.Address"></parameter>  
       <parameter name="transport.mail.Protocol">pop3</parameter>  
       <parameter name="mail.pop3.socketFactory.class"></parameter>  
  6. Send email to You can see the email recieving to ESB from the logs.
Note : If you are using gmail to receive emails, you have to allow external apps access in your google account as mention in here.

No comments:

Post a Comment