KB-2123 Emails fail to send through Office 365 with "Failed to process message due to a permanent exception with message" error

Symptoms

Office 365 is configured as the email server for an Appian Cloud site, which is failing to send emails. The following error is seen in the application server log:

javax.resource.spi.work.WorkCompletedException: com.appiancorp.process.engine.EmailSendException: Could not send email [from=<FROM_ADDRESS>, to=<TO_ADDRESS>, subject=<SUBJECT> 
...
Caused by: com.appiancorp.process.engine.EmailSendException: Could not send email [from=<FROM_ADDRESS>, to=<TO_ADDRESS>, subject=<SUBJECT>
...
Caused by: com.sun.mail.smtp.SMTPSendFailedException: 554 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message

Cause

Office 365 is blocking emails with the address specified in the from field of the above error message. Often, the site is using the Appian Cloud default system email address, admin@<CLOUD_SITE_URL>, which Office 365 is not configured to allow by default.

Action

There are two possible actions that can resolve the issue:

  • Update the Office 365 settings to allow sending from the blocked email address.
  • Open a support case with Appian Support to change the from email address to an address allowed by the Office 365 settings.

Affected Versions

This article applies to all versions on Appian Cloud.

Last Reviewed: May 2020

Related
Recommended