HACKER Q&A
📣 laurent123456

How to send emails from a web services without being flagged as spam?


I'm developing a web service and will need to send a few emails, for example when a new user registers, to recover passwords, etc. Basically useful emails (not spam).

So I'm wondering what's the best way to ensure they are received by the user? Right now I'm thinking of using OVH SMTP (ssl0.ovh.net) but I'm concerned the emails might end up being blocked. Any suggestion?


  👤 mattmanser Accepted Answer ✓
They're called transactional emails, I've used mailgun, sendgrid, mandrill, amazon SES. Much of a muchness in deliverability terms.

Setup SPF and DKIM, check it's all correctly setup. Be aware that if you're using SPF and you are sending emails from multiple servers (e.g. business email account like outlook365 and a transactional email service) it has to allow all the servers.


👤 lamlion
Hi there, it depends on how much e-mail you need to send in a specific timeframe and you want this service to be free and secure.100 e-mail per day is free forever at Sendgrid (https://sendgrid.com/pricing/). SendInBlue is even more cost-effective (https://www.sendinblue.com/pricing/)

👤 ramsj
There are any number of email sending providers with API access - Sendgrid, Mailgun, Mailjet, etc. Amazon SES is the most cost effective, but you'd need to do more setup youself vs. one of the API senders.

👤 ColinWright
In short, I believe you can't be sure. Every service I know suffers the problem of black-box, uncontrolled, unknowable spam filters at the destination, which is why web confirmation pages always say something like:

"If the email hasn't arrived within an hour or so, check your spam bin."

It can be mitigated by "doing things properly" but you can never be sure. Make sure your email is contentful and meaningful.

Anecdata: I use sendmail pretty much directly from my shared-hosting service and things very rarely go missing.