Poll Email from Microsoft Exchange EWS API

Overview

This plugin provides an alternative to sending emails to an Appian process model when inbound email integration is requested. Instead of the email being forwarded to Appian, this plugin reads the emails directly from the Exchange mailbox using the EWS web services API.

Deployment Instructions

  • Deploy the plugin through the admin console of your Appian Cloud site or by copying the plugin zip file to the plugins folder
  • Download the component from the App Market. The zip file "EWS Mail Poller applications.zip" contains sample applications for use with the plugin
  • Use the application, scripts, or XSDs that correspond to your database
  • Configure a Third Party Credentials entry in the admin console with the following parameters:
    • username: email identifier of the mailbox to poll. This is usually the part of the email address coming before the '@' character, but depending on the Exchange server may instead be the entire email address or domain\EmailAddress
    • password: password to access the mailbox
    • proxyUsername (or proxyusername) : username of the proxy account
    • proxyPassword (or proxypassword) : password of the proxy account

Key Features & Functionality

Smart service "EWS Mail Poller To DB":

  • Reads the mailbox using the EWS web service API
  • Convert the email to an EWM file stored as an Appian document
  • Store all email attachments as Appian documents
  • Store all email metadata (subject, author, recipients, etc...) into a set of tables in the database

To use this plug-in:

  • Create a process model to invoke the plugin on a schedule basis like every few minutes
  • Configure a Secure Credential Store with the following attributes
  • Configure the smart service plugin with the required inputs including the name of the Secured Credential Store created above

By default, the emails successfully processed are moved to the folder Deleted Items and the emails that cannot be processed are moved to the folder Junk E-mails.

Anonymous
  • Installed this plugin and configured it successfully to poll and read emails without attachment. But when there is an attachment in the email the sample process returns error - Invalid column name 'INLINE_ID'.

    I have used the MS SQL version of application. Any help is appreciated.

    Log details:

    2021-08-06 17:04:20,460 [Appian Work Item - 142 - execution02 : UnattendedJavaActivityRequest] ERROR com.appiancorp.ps.mail.MessageHandler - Error during email processing
    com.microsoft.sqlserver.jdbc.SQLServerException: Invalid column name 'INLINE_ID'.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:254)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1608)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:578)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:508)
    at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7240)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2869)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:243)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:218)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:461)
    at sun.reflect.GeneratedMethodAccessor819.invoke(Unknown Source)

  • v1.0.23 Release Notes
    • This new version fix the issue with the mail primary not being stored in the mail doc table when using MariaDB
  • HI - We are trying to use this plugin but we get could not resolve host error for EWS outlook URL when we try without proxy . We have to keep proxy flag as yes but looks like proxyusername and proxypassword is the required parameters for this plugin to work. We do not have these credentials as the server proxies do not authenticate .  We tried to change the code so that it does ask for proxyusername and password but it seems like  the proxy credentials are mandatory for working with proxy flag yes . Is that true ? Can we someone bypass the proxy credential requirements to make this plugin work?

  • Hi Sylvain.

    we have experienced after upgrading to Appian 21 the message "Unsupported database for processing email: mariadb" in logs.

    You will provide an update to version 21?

  • HI Sylvain,

    Please suggest me what all configurations are required in admin console, and what is proxy username and password?

    Note: I am working in Cloud environment.

  • Hi Team,


    Does anyone know the admin console settings to be done in order to use this plugin. The download doesn't have any properties file as described in the description. or is there something i am missing. Any leads would be helpful.

  • v1.0.22 Release Notes
    • Resolved issues with exception handling
  • Version 1.0.21 Release Notes
    • Resolved issues with invalid domains
  • I apologize but I do not understand your issue. This plugin is made so that Appian can read emails from Exchange. 

    Could you please provide more details on your issue?

  • Hi, I'm having problems with plugin. We are storing the attachments an appian folder before sending the email, but the email is sent but attachments name are wrong, the real names are replaced with just numbers, but the extension is fine.