Created
May 29, 2017 20:14
-
-
Save mrts/039a9764bf4d23cda1bdac564cd0dfc4 to your computer and use it in GitHub Desktop.
Send mail with Django so that recipients don't see other recipients
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.core.mail import send_mass_mail | |
subject = 'test subject' | |
message = 'test message' | |
from_email = 'from@from.com' | |
recipient_list = ['a@a.com', 'b@b.com', 'c@c.com'] | |
messages = [(subject, message, from_email, [recipient]) for recipient in recipient_list] | |
send_mass_mail(messages) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment