catch sending mail exceptions

v1-0-stable
Christian Merten 8 years ago
parent 7519cb3971
commit b2276e1392

@ -24,7 +24,7 @@ def send(subject, content, sender, recipients, reply_to=None,
for attach in attachments: for attach in attachments:
email.attach_file(attach) email.attach_file(attach)
try: try:
email.send() email.send(fail_silently=True)
except Exception as e: except Exception as e:
print("Error when sending mail:", e) print("Error when sending mail:", e)
failed = True failed = True

Loading…
Cancel
Save