by rubicon33 · 7y ago · 0 comments
How would I setup a "native" email system. I don't want to use some third party that I have to pay for. I'd like to be able to send the "raw" email myself.
So for example my current system uses Java + GMail's SMTP server. I have to pass it a username+password, and I can send basic emails that way. There are at least 2 major problems with this setup:
1) So far, all I have done is send REALLY basic 100% test based emails. It's not exactly clear to me how I would send a fully baked HTML email.
2) Consistently GMail BLOCKS my username. It requires me to manually go in at least every few days and enable "Allow less secure applications"
Sounds like you are using the Gmail API. To be honest that's not really fit for sending transactional emails, and is increasingly unfit for 3rd party consumption due to API restrictions.
Sendgrid also has a free tier that may work for your use case if the app is for a very limited audience, other than that you're kind of asking "how do I get something really difficult for free?"
Your app then then just call out to ssmtp, passing in the relevant mail information (to, from, subject, message, etc).
My only real, big issue with SES is with email templates as in I don’t know of any way to view templates in SES.
So, if you create an email template and want to preview it, you’ll have to do it locally/off-SES. If you need to handle hundreds of templates, this can get tedious.
The other minor tech issue is that SES needs you to work out of one of three regions - US east, west, and EU (if I recall correctly).
If, for legal or hygiene purposes you need your data anywhere else in the world, you’re SOL.
Other than these two, SES has been amazing. It costs pennies and I host all my email, both transactional and personal, with them. Worth noting that my transactional email is in the order of a few hundred per month, if that.
Mailgun is much more flexible about what they allow to go through their servers, but they have correspondingly lower delivery rates.