I am trying to configure Zoho Mail SMTP in Odoo 18 (Windows 11, local installation) but Odoo fails to send emails even though “Test Connection” is successful.
SMTP settings used:
SMTP Server: smtppro.zoho.in
Port: 465
Encryption: SSL/TLS
Username: full Zoho email
Password: app password
Outgoing email domain: configured
Odoo shows Test Connection: SUCCESS, but when I try to send an actual email (quotation, reset password, etc.) I get:
SMTPServerDisconnected: please run connect() first
What I need help with
What are the correct SMTP settings for Zoho Mail + Odoo 18?
Is there any additional configuration required (SPF, DKIM, ports, app password)?
Why does the Test Connection succeed but real email sending fails?
Does Zoho require a different hostname for SMTP from local servers?
If anyone is using Zoho Mail successfully with Odoo 18, please share the correct working configuration.
Thanks!
Hello ZAMEEL ISMAIL
The issue is Odoo's SMTP connection pooling trying to reuse closed connections. Here's the fix:
Create a custom module that forces fresh SMTP connections:
Result: Emails now send successfully with automatic retry logic and fresh connections.
Hope this information helps you.
Thanks & Regards,
Kunjan Patel
Hello Kunjan,
Thank you for your detailed explanation and for sharing the custom module fix.
I have implemented the module exactly as described, updated the Apps list, and confirmed that the module is installed. The SMTP Test Connection is successful, but when I try to actually send an email, I still get the same error:
smtplib.SMTPServerDisconnected: please run connect() first
Full traceback shows it failing at:
smtp.send_message(message)
self.ehlo_or_helo_if_needed()
SMTPServerDisconnected: please run connect() first
So even with the forced fresh SMTP connection and retry logic, Odoo 18 on Windows still throws the same “connect() first” error when sending emails (but not during the Test Connection).
It looks like Odoo is still trying to reuse or reinitialize the session incorrectly during the actual send process.
If you have any further suggestions or adjustments for the custom module—especially around handling the EHLO/HELO handshake or explicitly calling connect()—please let me know.
Thanks again for your help.