When two emails are processed under the same transaction, the second email which may have come from a valid sender is set as "received-ignored" and is marked as ignored by the Filter with an error string which may mention the subject of the previously ignored email.
This may also lead to stale behavior of email filter when is being processed for Inbound Email Flows.
Steps to Reproduce
- Send an email to a ServiceNow instance which would likely be received-ignored due to headers/subject/from.
- At the same time, send another email to the same ServiceNow instance which should be received.
- Make sure when email.read events are processed for both the emails, they should be processed in the same transaction.
- Wait until the email.read events are processed for both the email and appropriate filters/inbound action/flows are evaluated.
The first email should be set as received-ignored which would be filtered by Email properties or by Email Filters.
The second email should be set as received and should not be filtered by Email Properties or by Email Filters.
The second email is marked as received-ignored as its being filtered by Email Properties or by Email Filters.
The recommended workaround is to enable the Email Filter Plugin.
If the issue is still reproducible, then the following are the other workaround options:
- Disable the system property "glide.email.inbound.email_flow_trigger_enabled" by setting the property value to "false".
This would disable Inbound Email flows trigger evaluation.
- If the instance uses Inbound Email Flows, please revisit Email Filters, disable those filters which are using the "email" object to fetch the email variables.
If you'd like to use the filter, then modify the condition script to use the "current" object to fetch data from the sys_email record instead of getting the data from the "email" wrapper object. This "email" wrapper contains stale data.
Related Problem: PRB1383881