From 1069f80d829c2623b1ae3fe218ddf48a2787fd55 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Thu, 20 Nov 2014 07:00:35 +0100 Subject: Renamed function send_email to send_smtp. --- pyaggr3g470r/emails.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pyaggr3g470r') diff --git a/pyaggr3g470r/emails.py b/pyaggr3g470r/emails.py index 26fece56..9ebd8414 100644 --- a/pyaggr3g470r/emails.py +++ b/pyaggr3g470r/emails.py @@ -54,13 +54,13 @@ def send(*args, **kwargs): subject=kwargs.get("subject"), plaintext=kwargs.get("plaintext")) else: - send_email(to=kwargs.get("to"), + send_smtp(to=kwargs.get("to"), bcc=kwargs.get("bcc"), subject=kwargs.get("subject"), plaintext=kwargs.get("plaintext"), html=kwargs.get("html")) -def send_email(to="", bcc="", subject="", plaintext="", html=""): +def send_smtp(to="", bcc="", subject="", plaintext="", html=""): """ Send an email. """ @@ -89,7 +89,7 @@ def send_email(to="", bcc="", subject="", plaintext="", html=""): s = smtplib.SMTP(conf.NOTIFICATION_HOST) s.login(conf.NOTIFICATION_USERNAME, conf.NOTIFICATION_PASSWORD) except Exception: - logger.exception("send_email raised:") + logger.exception("send_smtp raised:") else: s.sendmail(conf.NOTIFICATION_EMAIL, msg['To'] + ", " + msg['BCC'], msg.as_string()) s.quit() -- cgit