by izend on 3/24/25, 7:00 PM with 11 comments
by albertgoeswoof on 3/24/25, 9:22 PM
If you only need this for transactional email, you could use MailPace, we support idempotency out of the box: https://mailpace.com/features/idempotent-email-api
by sarchertech on 3/24/25, 8:31 PM
The best you can do with email is at least once (and you can’t even really do that because of spam), so you should just build that assumption into your app. If 1 out of 100,000 emails gets sent 2x no one is going to care (as long as you include information the user can use to dedupe manually).
Maybe adding an idempotent send endpoint reduces that from 1 /100,000 to 1/150,000 or whatever, but is that worth the extra complexity? Is dropping your duplicate email rate from some very small number to some smaller number going to make enough money to pay for the extra dev time, and the extra lifetime maintainability burden? Almost certainly not.