My client wants to send email announcements and reports for customers. Now. The python-side code doesn’t seem too hard but there’s the rest of the story.
What do I require in order to send such emails that won’t end up getting blocked by email servers and clients?
Your program makes an SMTP connection to a sendmail server. If you own that server, you control it’s configuration. Nothing will be blocked going out.
Spam, however, is spam. Your client may think their email is golden, but their customers may think it’s spam. Oh well.
First, you have to make your email campaign ‘opt-in’. If customers want email notification, they request. If they don’t request, they don’t get email.
Second, you have to record the bounce you get from the supplied email address. Hard bounces come back with ‘no such address’ kinds of replies in various forms. Soft bounces are ‘we’re still trying or mailbox full.’ You have to make a judgement on what to do about bounces.
That’s about the best you can do. You can’t make people recognize that your client’s email is really important, but other spam is just spam.