opengovsg / postmangovsg

Templated message sending for public officers
https://postman.gov.sg
60 stars 16 forks source link

fix: blacklisting bug #2224

Closed KishenKumarrrrr closed 1 year ago

KishenKumarrrrr commented 1 year ago

Context

There is a bug in postman where when callbacks are processed, we blacklist the recipient of the email instead of the emails in the bouncedRecipients field of the Bounce object. AWS docs

Due to the introduction of the CC and BCC feature, this method of blacklisting emails is incorrect. (e.g if an email to a CCed user bounces, the recipient is blacklisted instead)

Approach

I modified the way we retrieve blacklisted users to make of the bouncedRecipients field.

Deploy Notes

N/A