Parsing email gets repeated when encountering an exception
Closed this issue · 3 comments
I have the EmailProcessor
class set up. In the process
method, it calls a class method in one of my other models and hits an exception (unrelated to emails). That caused the process
method to error out.
For whatever reason, the same email that was being processed that hit the exception repeatly keeps on getting processed randomly. It could happen 20 minutes later, an hour, two hours later, etc. I have rollbar set up and the exceptions are coming from the same email (same email text, same sender). I know it was just sent once because that's a test email from someone on my team.
Is there a way to stop these emails from retrying?
What provider are you using? I'm guessing that if the provider does not get a 200 back from the end point it will attempt to retry at a later time. Are you seeing multiple requests POSTed for that email?
I'm using sendgrid. You were right about not returning 200, since there was an error. Sendgrid will continue to retry for up to 72 hours. That email is no longer repeated now, so it's all good.
What provider are you using? I'm guessing that if the provider does not get a 200 back from the end point it will attempt to retry at a later time. Are you seeing multiple requests POSTed for that email?
Hello,
I met similar problem, but I didn't see any exception in the log. Is there any other reason that prevents sendgrid from receiving 200 status code?
Thanks a lot