5 ms·
> Do you mean your frontend sends a "send message X to user Y" request to your backend, which then enqueues it internally and handles the actual SMTP later? No
by mbesto 3y ago
> Do you mean your frontend sends a "send message X to user Y" request to your backend, which then enqueues it internally and handles the actual SMTP later?
No, I'm very familiar with transactional email services and why its superior to SMTP.
> You just send an API call to someone else's transactional email service and let them worry about all that.
100%. But you also need code to do that. Typically the front-end form calls a backend endpoint (a controller for example in MVC) and then the back-end manages the request with the external API. Hence why there are endless docs like this: https://docs.sendgrid.com/for-developers/sending-email/quickstart-ruby https://docs.sendgrid.com/for-developers/sending-email/quick...
At scale, those calls are actually handled by a message queue (like Redis). If you let the front-end code handle it, you would likely get throttled by the transactional email service provider.
- solardev 3y agoAh, I see what you're saying now! Sorry I misunderstood, and thanks for explaining. That does sound like something better dealt with on the backend at sufficient scale. The Resend API rate limit appears to be 10/sec.