From 7f355b3f53cba5722a1c5c112d71e2d670c4d292 Mon Sep 17 00:00:00 2001 From: s-aga-r Date: Thu, 23 Apr 2026 11:25:54 +0530 Subject: [PATCH] fix(SMTP): config to disable EHLO after AUTH --- frappe/email/smtp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frappe/email/smtp.py b/frappe/email/smtp.py index 997cb87758..2c2ca1abf0 100644 --- a/frappe/email/smtp.py +++ b/frappe/email/smtp.py @@ -93,7 +93,8 @@ class SMTPServer: frappe.msgprint(res[1], raise_exception=frappe.OutgoingEmailError) # Re-issue EHLO after AUTH to refresh server capabilities - _session.ehlo() + if not frappe.conf.smtp_no_ehlo_after_auth: + _session.ehlo() self._session = _session self._enqueue_connection_closure()