Mail Poller

Overview

This version is for Appian 22.3 and above. Cloud customers on a lower version of Appian that want to install this plugin should open a support case. Self-managed customers can find the latest jar for Appian 22.2 and lower version by downloading from the app market.

Enhancement to the plug-in to enable the selection of whether or not to include the email attachments as part of the EML document. Previously, the plug-in would create an EML document with the attachments stripped out. Our client needs to preserve the original e-mail as it was sent (for auditing purposes), so the EML must include the attachments as part of it. This update extends the functionality to allow the user to select whether they want an EML with the attachments removed (original functionality), an EML with attachments included, or both (2 EMLS of original email - one without the attachments included and one with the attachments included). Any e-mail attachments will continue to be saved separately. 

Key Features & Functionality

Takes all unread email from a mailbox and adds entries directly to a database table.The original email is saved as an EML based on three attachment type options

  1. EML with attachments removed
  2. EML with attachments included
  3. Both (2 EMLs of original email) - EML with attachments removed and EML with attachments included

Each email attachment is saved as its own document. The database tables store the Appian document ids, email recipients, subject and body (text and HTML)

Anonymous
  • Hi ,

    I have the requirement to pull the mails into appian and need to access the email details like sender, email subject and email content and attachments, does this plug-in fulfill my requirement? 

    Thanks in advance.

  • Hi ,

    I have used this plugin in our application, CC_NAMES and TO_NAMES are not capturing in APP_MAIL_POLLER table, could you please provide the solution for this?

    Also I have following questions could you please answer for that

    1.Maximum how much MB attachments this plugin will read?

    2.On failure, I need to mark it as unread so is there any way to do that? 

  • The poller can only have one instance running at a time. Check your processes to make sure you don't have one executing in parallel.

  • Hi

    This poller plugin started failing since yesterday all of sudden in all environment with below error.

    "poller already running"

    When we further checked, it is reading email with above error. All the email accounts we have are failing with this error.

    What could have been went wrong, could you please help us to understand.

    Thanks in advance.

  • The socket timeout likely indicates a problem with establishing the connection. If you are sure the connection string and credentials are correct, then it could be a problem on the firewall. Check with the networking team.


  • Hello Mike,

    i'm trying to use your plugin but, even trying different configuration I can't succeed in my purpose Sweat smile
    I'm already using EWS Mail Poller To DB correctly but it is limited to Exchange account and your plugin is way more flexible.
    The error I'm receiving is "Read Timeout".
    I've configured a third party authentication with username and password keys, verified host configuration from mail provider and, despite that it doesn't work.
    Tomcat stdout reports:

    [Appian Work Item - 240029 - execution01 : UnattendedJavaActivityRequest] ERROR com.appiancorp.ps.mail.MailPollerSmartService - Error during mail polling
    javax.mail.MessagingException: Read timed out;
      nested exception is:
    	java.net.SocketTimeoutException: Read timed out
    	at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:670)
    	at javax.mail.Service.connect(Service.java:295)
    	at javax.mail.Service.connect(Service.java:176)
    	at javax.mail.Service.connect(Service.java:125)
    	at com.appiancorp.ps.mail.MailPoller.<init>(MailPoller.java:92)
    	at com.appiancorp.ps.mail.MailPollerSmartService.run(MailPollerSmartService.java:148)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:131)
    	at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:52)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:131)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:125)
    	at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:25)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:125)
    	at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:83)
    	at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55)
    	at com.appiancorp.process.engine.ContinuationRequest.executeOuter(ContinuationRequest.java:71)
    	at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:100)
    	at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:36)
    	at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:84)
    	at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:239)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    	at java.lang.Thread.run(Thread.java:748)
    Caused by: java.net.SocketTimeoutException: Read timed out
    	at java.net.SocketInputStream.socketRead0(Native Method)
    	at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
    	at java.net.SocketInputStream.read(SocketInputStream.java:171)
    	at java.net.SocketInputStream.read(SocketInputStream.java:141)
    	at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:124)
    	at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
    	at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
    	at com.sun.mail.iap.ResponseInputStream.readResponse(ResponseInputStream.java:95)
    	at com.sun.mail.iap.Response.<init>(Response.java:95)
    	at com.sun.mail.imap.protocol.IMAPResponse.<init>(IMAPResponse.java:60)
    	at com.sun.mail.imap.protocol.IMAPProtocol.readResponse(IMAPProtocol.java:286)
    	at com.sun.mail.iap.Protocol.<init>(Protocol.java:123)
    	at com.sun.mail.imap.protocol.IMAPProtocol.<init>(IMAPProtocol.java:115)
    	at com.sun.mail.imap.IMAPStore.newIMAPProtocol(IMAPStore.java:685)
    	at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:636)
    what am I doing wrong?
    Sorry for bothering you and all people in this community but i don't know what I have to do.

    Thanks in advance for your patience and your time
    Kind Regards

  • How much unread mail are in each of the new boxes that you are adding in? At a high level it sounds like the backlog of unread items is either high in quantity or size (or both)

  •  We have marked all mailboxes to inactive. Mark, enabled one mailbox and cancelled all active instances, ran the inbound process manually. It succeeded without any error. Next we enabled another mailbox, then it failed giving error message that the first mailbox is already running. After 15-20 mins, both of them ran successfully. Again Mark enabled 5 mailboxes, we got the same errors, after few runs all 5 ran successfully. Now we enabled all and the errors are random. Sometimes all run successfully and the next run will fail....so on. The only change we did was downloaded the new plugin after Mike's changes. Just checked and we are still receiving the "already running errors". Any pointers on what we might be missing to look for since we have ~19 active mailboxes. 

  • Can you check to make sure that there really is only one sequence running at a time as opposed to having two or more that are chaining to each other? You can confirm this by cancelling all active instances completely and then manually starting just one. What did you do to get it to accept 5 more since you previously said it was failing on the second one?

  • Correct, yes we have single instance per Mailbox. Every 5 mins, the process kicks off and we still get the same error. If this might help, Its with InView project. Now we have 6 mailboxes ran successfully and failed on the next enabled one. The poller just keep sending the same error for every run.