mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-20 14:29:25 -04:00
New complaints model to persist complaints from SES.
If a someone gets an email from one of our services and then complain about it (mark as spam or otherwise), we get a callback from SES. The service needs to know about these complaints so they can remove that email from their mailing list.
This commit is contained in:
@@ -35,6 +35,8 @@ def process_ses_response(ses_request):
|
||||
if notification_type == 'Bounce':
|
||||
notification_type = determine_notification_bounce_type(notification_type, ses_message)
|
||||
elif notification_type == 'Complaint':
|
||||
# Complaints are going to be stored in a table of it's own,
|
||||
# this will no longer update the status of a notification as it does now.
|
||||
remove_emails_from_complaint(ses_message)
|
||||
current_app.logger.info("Complaint from SES: \n{}".format(ses_message))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user