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.

fixes #19634 (#20545)

Anshuman Sainie40e9db39ab2
diff --git a/api/libs/smtp.py b/api/libs/smtp.py
index 2325d69a413..35561f071cf 100644
--- a/api/libs/smtp.py
+++ b/api/libs/smtp.py
@@ -28,7 +28,8 @@ class SMTPClient:
else:
smtp = smtplib.SMTP(self.server, self.port, timeout=10)
- if self.username and self.password:
+ # Only authenticate if both username and password are non-empty
+ if self.username and self.password and self.username.strip() and self.password.strip():
smtp.login(self.username, self.password)
msg = MIMEMultipart()