소스 검색

Update smtp.py (#21335)

tags/1.5.0
AuditAIH 4 달 전
부모
커밋
a098825fcc
No account linked to committer's email address
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4
    0
      api/libs/smtp.py

+ 4
- 0
api/libs/smtp.py 파일 보기

@@ -22,7 +22,11 @@ class SMTPClient:
if self.use_tls:
if self.opportunistic_tls:
smtp = smtplib.SMTP(self.server, self.port, timeout=10)
# Send EHLO command with the HELO domain name as the server address
smtp.ehlo(self.server)
smtp.starttls()
# Resend EHLO command to identify the TLS session
smtp.ehlo(self.server)
else:
smtp = smtplib.SMTP_SSL(self.server, self.port, timeout=10)
else:

Loading…
취소
저장