boostorg / website-v2

New Boost website
https://boost.io
Boost Software License 1.0
8 stars 13 forks source link

Send individual emails to each notified user #1429

Closed GregKaleka closed 1 week ago

GregKaleka commented 1 week ago

Fixes #1428

Previously, we sent a single email with all recipients in the bcc field, and no one in the to field. Mailgun does not support this.

This PR changes that behavior to send an email to each user using Django's send_messages (plural) method.

Note: I wasn't able to confirm this in the Mailgun documentation, but I assume this should not have any cost implications. Sending a "single" email with 100 bcc recipients should cost the same as sending 100 emails each with a single to recipient.

Another note: I did not test performance of this with many recipients. Probably all of our notification emails should be getting sent in a Celery task... probably a future optimization.