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.

Update smtp.py (#21335)

AuditAIHa098825fcc49
diff --git a/api/libs/smtp.py b/api/libs/smtp.py
index 35561f071cf..b94386660ec 100644
--- a/api/libs/smtp.py
+++ b/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: