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
  • v1.1.1 Release Notes
    • Security updates
  • The plugin only supports basic auth. Microsoft will be disabling this for Exchange Online, but customers with Exchange Online should be migrating to MS Graph (https://community.appian.com/b/appmarket/posts/msgraph-email-poller).

  • Hi, we are facing an issue when we use the plug-in with a proxy that doesnt have credentials its returning the error

          "required field proxyUsername does not exist in SCS(buzondesa)"

    how can we solved this issue?

    kind Regards

  • Hello, any guidance on the following issue we are facing ?

    2022-01-05 11:15:40,236 [Appian Work Item - 232292 - execution02 : UnattendedJavaActivityRequest] ERROR com.appiancorp.ps.mail.EWSMailPollerToDBSmartService - Unexpected error polling for mail
    microsoft.exchange.webservices.data.core.exception.service.remote.ServiceRequestException: The request failed. ParseError at [row,col]:[1,1421]
    Message: Character reference "&#
    	at microsoft.exchange.webservices.data.core.request.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:74)

    The service has stopped in our QAS system and we urgently need to resume integration, any hep would be appreciated.

    Kind regards,

  • Hello, we have been running the poller for some time now, but in our QAS system suddenly we are not able to process emails and always receive the following error:

    2022-01-05 11:15:40,236 [Appian Work Item - 232292 - execution02 : UnattendedJavaActivityRequest] ERROR com.appiancorp.ps.mail.EWSMailPollerToDBSmartService - Unexpected error polling for mail
    microsoft.exchange.webservices.data.core.exception.service.remote.ServiceRequestException: The request failed. ParseError at [row,col]:[1,1421]
    Message: Character reference "&#
    	at microsoft.exchange.webservices.data.core.request.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:74)

    Does anyone have any view on this issue ? 

    Kind regards,

  • v1.1.0 Release Notes
    • Adds support for inline images. Inline images can now be created as Appian documents. Additionally, the inline image metadata is added to the APP_MAIL_POLLER_DOC table and the updated HTML (with Appian docs ids substituted for the original content ids), is stored in a new column in the APP_MAIL_POLLER table. This allows for easy display of the email content with inline images in rich text component plugins.
    • The updated plugin expects the following new columns
    • BODY_SWAPPED_IMAGES in APP_MAIL_POLLER: data type should be the same as BODY_HTML column (longtext in MariaDB)
    • INLINE_ID in APP_MAIL_POLLER_DOC: data type should be able to hold 255 text characters (varchar 255 in MariaDB)
    • DISPOSITION in APP_MAIL_POLLER_DOC: data type should be able to hold 255 text characters (varchar 255 in MariaDB)
  • v1.0.24 Release Notes
    • Fixed issue with jar file
  • Hi,

    We are facing an issue when we attach a file with a file name that contains (×) this character For Eg. Sample_300×300.jpg, EWS Poller move it to the Exception folder and Email Notification is sent to Alert Receivers. Any leads would be helpful.

  • I was able to figure it out. This version of plugin 1.0.23 expects a DB columns which isn't provided by the Application which is provided with plugin, but it's easy to add by running below script.

    ALTER TABLE [dbo].[APP_MAIL_POLLER_DOC]
    ADD INLINE_ID int,
    DISPOSITION nvarchar(2000);

    For those who are looking to figure out configurations. these are the steps to follow after the sample application is installed:

    Update the table APP_MAIL_POLLER_DOC

    ALTER TABLE [dbo].[APP_MAIL_POLLER_DOC]

    ADD INLINE_ID int,

    DISPOSITION nvarchar(2000);

    1. Create Secure Credential Store: ewsmailpollerscs with fields username and password and include plugin EWS Mail Poller. Username should contain complete email address including @xxx.com
    2. Update Properties in APP Poll Mail From Mailbox Process Model

    Service URL: https://outlook.xxxx.com/EWS/Exchange.asmx

    Domain: provide your domain like xxx.com

    Jndi Name: change with your DB Jndi available in Data Store

    Exception Folder Name: Junk Email

    Processed Folder Name: Deleted Items