mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 03:32:23 +08:00
Authentication is only applied when both the username and password have values. (#2937)
This commit is contained in:
parent
240a94182e
commit
cc754122fc
|
@ -16,7 +16,7 @@ class SMTPClient:
|
|||
smtp = smtplib.SMTP(self.server, self.port)
|
||||
if self._use_tls:
|
||||
smtp.starttls()
|
||||
if (self.username):
|
||||
if self.username and self.password:
|
||||
smtp.login(self.username, self.password)
|
||||
msg = MIMEMultipart()
|
||||
msg['Subject'] = mail['subject']
|
||||
|
|
Loading…
Reference in New Issue
Block a user