How to process Emails which are Bounced / Returned / Undelivered?

G24
Kilo Sage

What is the best and most reliable way to attach some processing in ServiceNow for bounced emails?

 

I'm having difficulty finding a good example.  Has anyone had success with this?  Can someone share some actual working code?

 

My users want to send out a very important email related to a natural disaster.  If they send it out to 100 customers and 5 of those "bounce" back, for whatever reason, they want a report or notification about the 5 that bounced, so they can Call those individuals on the telephone instead.

 

Challenges

1)  I'm very unclear on if I can use an Inbound Email Action for this, or NOT, because the bounced emails may be "Filtered" before Inbound Email Actions are performed.

 

2)  I thought about using an async after Business Rule on table sys_email, but I'm unclear as to where the bounced email notifications will ultimately end up.  Would they go into the sys_email "Received" mailbox, or the "Junk" mailbox?  Or some of both?  Or somewhere else?

 

3)  It seems like the BODY of bounced emails does not actually contain the Email Address that was problematic.  Unfortunately I believe that I would need to open up the attached file, and parse that.

 

4)  I'm having some difficulty actually Simulating or Generating bounced emails in my Dev environment.  I'm using the 

property glide.email.test.user to re-route Dev emails, and for whatever reason, when I put garbage in that field, I am not getting bounced emails back.

 

Examples of emails that we would expect to get an undeliverable notification on:

GarbageName@ValidDomain.com

ValidName@GarbageDomain.com

 

 

4 REPLIES 4

kmohammed
Kilo Guru

One way to handle bounced emails in ServiceNow is to set up an inbound email action that filters bounced emails and routes them to a specific mailbox or table. You can then use a business rule to extract the email address that caused the bounce and take appropriate action, such as sending a notification or creating a report.

To filter bounced emails, you can use the "Return-Path" or "X-Failed-Recipients" headers, which typically contain the email address that caused the bounce. You can also examine the body of the email for keywords or phrases that indicate a bounce, such as "undeliverable" or "failed delivery".

It is possible that bounced emails may be filtered before they reach the inbound email action, so it is important to test and ensure that your filters are working as expected.

Regarding the bounced email notifications, they are likely to end up in the "Junk" mailbox, but it depends on the email server configuration.

It is true that the body of bounced emails does not contain the problematic email address, so you will have to parse the attached file to get that information.

Regarding simulating bounced emails in your dev environment, you can try using invalid email addresses or sending emails to non-existent email servers. Also, you can try to reach out to ServiceNow support for assistance with simulating bounced emails in the dev environment.

Neil P
Tera Contributor

Hi - just wondering if you made any headway on this question, I've got a similar requirement.

Vasantharajan N
Giga Sage
Giga Sage

@G24 / @Neil P - We have the answer for this in Washington release leveraging the "Email bounce management". More details you can find in the docs https://www.servicenow.com/docs/bundle/xanadu-platform-administration/page/administer/notification/c...


Thanks & Regards,
Vasanth

@Vasantharajan N - thank you very much for this link, I'm looking in to it now.