This commit is contained in:
slidingshade 2024-06-20 04:29:33 +00:00 committed by GitHub
commit 405d988d2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -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())