KB-1817 Errors due to special characters in password.properties
Symptoms
A mail server is set up to be used with Appian. Appian is configured for either:
- SMTP server authentication, with
conf.mailhandler.mail.smtp.auth=truein custom.properties. - Email Polling.
When configured for SMTP server authentication, the following error message is seen in the application server log:
ERROR com.appiancorp.process.runtime.activities.SendEmailActivity - javax.mail.AuthenticationFailedException: 535 5.7.8 Error: authentication failed: authentication failure
When configured for polling an email account, the following error message is seen mail-listener.log:
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: Authentication failed.
The following are both true when configured for SMTP server authentication:
- The SMTP username,
conf.mailhandler.mail.user, in custom.properties is correct. - The associated password,
conf.password.SMTP, in password.properties is correct.
The following are both true when configured for polling an email account:
- The email username
conf.mailhandler.poller.EmailHandlerBean.userNamein custom.properties is correct. - The associated password
conf.password.EmailHandlerBean.EMAIL_HANDLERin password.properties is correct.
Cause
Some special characters within password.properties need to be escaped when used in:
- The STMP password field,
conf.password.SMTP - The email user password field,
conf.password.EmailHandlerBean.EMAIL_HANDLER
The characters which need to be escaped may vary depending on the mail server being used. For example, it is known that the character , needs to be escaped.
Action
If it is determined a special character needs to be escaped, add the characters \\ in front of the special character.
- E.g.
conf.password.SMTP=password\\,example
Some special characters do not need to be escaped. To test if a special character needs to be escaped when authentication is failing:
- Change the password to remove the special character in question.
- If authentication is successful without the special character, re-add the special character and escape it with
\\.
Affected Versions
This article applies to Appian 17.2 and later.
Last Reviewed: December 2018
