KB-1749 Email polling error "Logon failure: unknown user name or bad password" when using Microsoft Exchange Server


When using Appian email polling with Microsoft Exchange Server, mail-listener.log shows the following error:

[ServerService Thread Pool -- 63] INFO com.appiancorp.process.emailpoller.EmailPoller - MA 1 endpointActivation success MailActivationSpec(storeProtocol=pop3, mailServer=servername, port=110, starttls=false, mailFolder=INBOX, userName=domainusername, password non-null, pollingInterval=30000, messageSelector=null, maxMessages=1, debug=true, partialFetch=true, forceImapLogin=false)
[Appian MailActivation - 1] ERROR com.appiancorp.process.emailpoller.MailActivation - An error occurred while attempting to open the mailbox to poll; no mail will be fetched.
javax.mail.AuthenticationFailedException: Logon failure: unknown user name or bad password.

In addition to the above error message, it is confirmed that:

  • The email username specified with conf.mailhandler.poller.EmailHandlerBean.userName in custom.properties is the intended user.
  • The associated password specified with conf.password.EmailHandlerBean.EMAIL_HANDLER in password.properties is correct.


Microsoft Exchange Server email usernames are specified with the format domain\username. However, the \ symbol is a special character in the Simple Mail Transfer Protocol, and it is filtered out when interpreted by Appian in custom.properties.

This causes the email userName field with format conf.mailhandler.poller.EmailHandlerBean.userName=domain\username to be interpreted as domainusername by Appian. This can be seen in the above error message.


  • When specifying the email userName field with format domain\username, the \ character needs to be escaped.
  • The email userName field should be changed to follow the below format:

Affected Versions

This article applies to Appian 18.2 and later using Microsoft Exchange Server.

Last Reviewed: October 2018