Commit 3096e71b authored by Jonathan Michalon's avatar Jonathan Michalon

Un"hide" send_email as it's not a shame to use it (outside the helpers) too

parent 0735e600
...@@ -71,7 +71,8 @@ _mailer = ThreadedSMTP() ...@@ -71,7 +71,8 @@ _mailer = ThreadedSMTP()
def quit(): def quit():
_mailer.quit() _mailer.quit()
def _send_email(subject, body, extra_headers={}):
def send_email(subject, body, extra_headers={}):
from . import config from . import config
# encode / decode is a fix that didn't make it into Debian Wheezy # encode / decode is a fix that didn't make it into Debian Wheezy
...@@ -112,8 +113,9 @@ def send_email_for_check(check): ...@@ -112,8 +113,9 @@ def send_email_for_check(check):
extra_headers['References'] = check.mails_msgid extra_headers['References'] = check.mails_msgid
check.mails_msgid = extra_headers['Message-ID'] check.mails_msgid = extra_headers['Message-ID']
_send_email(subject, msg_text, extra_headers) send_email(subject, msg_text, extra_headers)
def send_email_report(text): def send_email_report(text):
from . import config from . import config
_send_email(config.emails.report.subject, text) send_email(config.emails.report.subject, text)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment