Last updated: Nov 5th, 2024
Overview
This article explains whether it is possible to receive an alert or attempt a retry if an email fails to be sent to an end user.
Applies To
- Emails
- Notifications
- Retries
Solution
The standard email providers Auth0 supports do not provide an automatic retry mechanism.
- If the email provider returns a failure status code, type: fn logs will be triggered and could be detected when using a log stream for external log processing.
- Issues that occur after an email provider has indicated it has successfully accepted the email request, however, can not be detected from the Auth0 side and would need to be monitored on the email provider side’s logs instead.
How the “fn” log type, when detected, requires custom implementation implementation where the log stream is ingested. Examples could be:
- Send a Slack message
- If the email is one Auth0 supports manually triggering via APIs, attempt a (limited number of) retries, such as a password reset or email verification if the error description indicates a timeout or similar transient issue.
Alternatively, a fully custom email provider can now be configured, which can allow for coding in limited retries and other automated processes based on the email provider’s responses: