by ThePhysicist · 6y ago · 0 comments
You can use a worker and scheduling framework like Celery and Celerybeat to e.g. periodically go through your users and generate mails. The advantage is that it's much easier to integrate this with your backend and tie the mails to actual user actions. Just make sure to record which mails you have sent already to a given user to avoid sending the same stuff more than once.
But maybe don't take my advice on this, we're a really privacy-focused startup so we try to keep most of our customers' data in-house for security and privacy reasons, I know that there are a lot of people that will recommend to rely on external services for this (and they might be right in many circumstances).
That's just 100% incorrect. All that needs to happen for you to start receiving problems is for the SPAM Screening Monoculture of Brightworks, Symantec, etc. to latch on to your domain and/or IP and then you're out of the inbox on all major email address providers. Note: users on the major services using "Junk" as their delete button is a signal to these screening companies.
Of course the transactional mailing providers want to scare you into thinking it's not possible to just deliver mail yourself. That might be true if you operate at a large scale, but for most B2B SaaS apps it's completely fine to send the mails yourself.
Is it? Does your knowledge about this come from personal experience? Did you start using your own email server then migrated to a hosted one?
I've been a part of companies (both couple of years old companies, and newly started companies) who used our own email server running on the same hardware as the application servers were running on, and never had issues with emails ending up in spam. We made sure we had all the SPF/DKIM and the rest setup correctly, and only had delivery issues when we issues with the server itself or the receiving email server.