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()