Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

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

Leo Qcc754122fc11
diff --git a/api/libs/smtp.py b/api/libs/smtp.py
index 6c8e0c2777c..30a795bd70a 100644
--- a/api/libs/smtp.py
+++ b/api/libs/smtp.py
@@ -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']