mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-10 19:36:53 +08:00
Authentication is only applied when both the username and password have values. (#2937)
This commit is contained in:
@@ -16,7 +16,7 @@ class SMTPClient:
|
|||||||
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']
|
||||||
|
|||||||
Reference in New Issue
Block a user