mirror of
https://github.com/janeczku/calibre-web
synced 2025-11-30 13:38:04 +00:00
Support SMTP without authentication
This commit is contained in:
@@ -126,7 +126,8 @@ def send_mail(book_id, kindle_mail):
|
|||||||
mailserver.starttls()
|
mailserver.starttls()
|
||||||
mailserver.ehlo()
|
mailserver.ehlo()
|
||||||
|
|
||||||
mailserver.login(settings["mail_login"], settings["mail_password"])
|
if settings["mail_password"]:
|
||||||
|
mailserver.login(settings["mail_login"], settings["mail_password"])
|
||||||
mailserver.sendmail(settings["mail_login"], kindle_mail, msg)
|
mailserver.sendmail(settings["mail_login"], kindle_mail, msg)
|
||||||
mailserver.quit()
|
mailserver.quit()
|
||||||
except (socket.error, smtplib.SMTPRecipientsRefused, smtplib.SMTPException), e:
|
except (socket.error, smtplib.SMTPRecipientsRefused, smtplib.SMTPException), e:
|
||||||
|
|||||||
Reference in New Issue
Block a user