Merge 3acfc416bf into e69f5c182a
This commit is contained in:
commit
405d988d2f
|
|
@ -37,8 +37,7 @@ class Sender:
|
||||||
|
|
||||||
msg.attach(mobi)
|
msg.attach(mobi)
|
||||||
|
|
||||||
smtp = smtplib.SMTP(host=self.host, port=self.port)
|
smtp = smtplib.SMTP_SSL(host=self.host, port=self.port)
|
||||||
smtp.starttls()
|
|
||||||
if self.user is not None:
|
if self.user is not None:
|
||||||
smtp.login(self.user, self.passwd)
|
smtp.login(self.user, self.passwd)
|
||||||
smtp.sendmail(self.from_addr, [email], msg.as_string())
|
smtp.sendmail(self.from_addr, [email], msg.as_string())
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue