filter duplicate email addresses

v1-0-stable
Christian Merten 9 years ago
parent c67ae26ccb
commit 12ee39c010

@ -17,7 +17,7 @@ def send(subject, content, sender, recipients, reply_to=None,
else: else:
kwargs = {} kwargs = {}
with mail.get_connection() as connection: with mail.get_connection() as connection:
for recipient in recipients: for recipient in set(recipients):
email = EmailMessage(subject, content, sender, [recipient], email = EmailMessage(subject, content, sender, [recipient],
connection=connection, **kwargs) connection=connection, **kwargs)
if attachments is not None: if attachments is not None:

Loading…
Cancel
Save