fix SMTP connectivity test, appendum to a8d0670
This commit is contained in:
parent
94b1fef28e
commit
acbf42f89d
@ -58,6 +58,10 @@ class SMTPMailer(object):
|
|||||||
self.from_addr = conf.get('SMTP', 'from')
|
self.from_addr = conf.get('SMTP', 'from')
|
||||||
self.to_addr = conf.get('SMTP', 'to')
|
self.to_addr = conf.get('SMTP', 'to')
|
||||||
|
|
||||||
|
# test SMTP connectivity
|
||||||
|
with Connection(self.conf):
|
||||||
|
pass
|
||||||
|
|
||||||
def sendmail(self, subject, body):
|
def sendmail(self, subject, body):
|
||||||
|
|
||||||
msg = MIMEText(body, 'plain', 'utf-8')
|
msg = MIMEText(body, 'plain', 'utf-8')
|
||||||
|
Loading…
Reference in New Issue
Block a user