Email worker triggered multiple times for the same email
I have a simple worker that is triggering on a specific email address. This worker does some attachment processing, add some data in d1, then sending an email back to the user. This is all correctly triggered, and this is the end of the handler:
The issue is that sometimes (not always) I get multiple triggers for the same email, in a span of a few hours
For example, the original message is processed, then after a few minutes I get another trigger, then after 20 minutes I get another one and so on over a few hours.
Has anyone experienced something similar?
3 Replies
Yes, I had the exact same issue and in my case I wasn't always replying to the mail (I did some actions based on the content of the mail but didn't reply/forward/reject it) or the worker had an exception so I think it was being retried(?)
Check the email routing logs it should say if it was replied/dropped
Yep spot on, I'm gonna verify every code branch and ensure that there is always a reply/forward/reject. thanks!
Np