Table of contents

Emails

Email callbacks from Notify fails

Callbacks from Notify may fail and require us to manually query the status of emails.

There are two rake tasks that can do this using either the reference or the email_id

Query the Notify API for email(s) by reference

⚙ Run rake task on production

Query the Notify API for email(s) by email ID

⚙ Run rake task on production

Example output when a notification is found:

Query Notify for emails with the reference ref_123
-------------------------------------------
Notification ID: f163deaf-2d3f-4ec6-98fc-f23fa511518f
Status: delivered
created_at: 2019-01-29 11:12:30 UTC
sent_at: 2019-01-29 11:12:40 UTC
completed_at: 2019-01-29 11:12:52 UTC

Example output when a notification is not found:

Query Notify for emails with the reference PPP
No results found, empty collection returned

Example output when the request fails:

Query Notify for emails with the reference ref_123
Returns request error 400, message: [{"error"=>"ValidationError",
"message"=>"bad status is not one of [created, sending, sent,
delivered, pending, failed, technical-failure, temporary-failure,
permanent-failure, accepted, received]"}]
This page was last reviewed on 7 August 2019. It needs to be reviewed again on 7 November 2019 by the page owner #govuk-2ndline .
This page was set to be reviewed before 7 November 2019 by the page owner #govuk-2ndline. This might mean the content is out of date.