Sends email when encountering an error and retries.