瀏覽代碼

Authentication is only applied when both the username and password have values. (#2937)

tags/0.6.0-preview-workflow.1
Leo Q 1 年之前
父節點
當前提交
cc754122fc
No account linked to committer's email address
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      api/libs/smtp.py

+ 1
- 1
api/libs/smtp.py 查看文件

smtp = smtplib.SMTP(self.server, self.port) smtp = smtplib.SMTP(self.server, self.port)
if self._use_tls: if self._use_tls:
smtp.starttls() smtp.starttls()
if (self.username):
if self.username and self.password:
smtp.login(self.username, self.password) smtp.login(self.username, self.password)
msg = MIMEMultipart() msg = MIMEMultipart()
msg['Subject'] = mail['subject'] msg['Subject'] = mail['subject']

Loading…
取消
儲存