DemocracyLab / CivicTechExchange

https://www.democracylab.org
MIT License
97 stars 64 forks source link

Investigate mass email API solution #1074

Open marlonkeating opened 11 months ago

marlonkeating commented 11 months ago

Currently to send emails we use Gmail via SMTP. This has become problematic on a number of fronts, as Gmail does not recommend this use case and has disabled mail accounts for spamming in the past, and sometimes the SMTP connection goes stale and the server has to be manually restarted to fix the connection.

We would like to find a more reliable API solution for sending mass emails going forward.

Minimum Requirements

Judging Criteria

Options to investigate

ddfridley commented 11 months ago

EnCiv uses Brevo.com (was SendInBlue.com). They have a free plan and use APIs. https://www.brevo.com/pricing/

And python APIs. https://github.com/sendinblue/APIv3-python-library

ddfridley commented 7 months ago

Mailchimp does have transactional email apis. It's $20 per block of 25000 emails sent - so not out of reach. https://github.com/mailchimp/mailchimp-transactional-python

ddfridley commented 5 months ago

A point to investigate is that our server uses SMTP to send the whole content to the email address. Many of the transactional email systems use APIs where there would be a template on the providers side, and the server would send the data as parameters to go into the template.

Ideally we would find a provider that allowed us to send SMTP, or that provides an API where we could send the complete content like we do with SMTP.

If we can't get that type of solution, and we have to go with templating - then we need to find a generic way that makes it easy to switch providers when we need to.