|
@@ -5,6 +5,7 @@ try:
|
|
|
except ImportError:
|
|
|
from email.MIMEText import MIMEText
|
|
|
|
|
|
+
|
|
|
class Message(object):
|
|
|
|
|
|
def __init__(self, to=None, sender=None, subject=None, body=None,
|
|
@@ -37,13 +38,12 @@ class Mailer(object):
|
|
|
client = smtplib.SMTP(self.host, self.port)
|
|
|
|
|
|
if self.user and self.password:
|
|
|
- server.login(self.user, self.password)
|
|
|
+ client.login(self.user, self.password)
|
|
|
|
|
|
client.sendmail(message.sender, message.to, str(message))
|
|
|
client.quit()
|
|
|
|
|
|
|
|
|
-
|
|
|
def mail_admins(subject, message, fail_silently=False):
|
|
|
"""Send a message to the admins in conf.ADMINS."""
|
|
|
from celery import conf
|