Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I'm trying to configure access to a catch-all mail hosted by Zoho.com with my own domain. Everything worked fine before, with a Gmail address (not my domain, just a regular Gmail account) but with Zoho I can't send emails.
1) Incoming is configured for IMAP and working flawlessly.
2) Outgoing is configured as follows:
Description: Zoho (catch-all)
SMTP Server: smtp.zoho.com
SMTP Port: 465
Debugging: [not flagged]
Connection Security: SSL/TLS
Username: <email@example.com)< p="">
The [Test Connection] works but when sending emails from any application I get the infamous message "SMTPServerDisconnected: Connection unexpectedly closed". I already tried to set Alias Domain to 'localhost' and '127.0.0.1' with the same results. Couldn't find much help on the net so I'm posting here...
Thanks in advance for any help!
I also have same problem.
After one day of investigation, I found the problem is because Zoho only allow you send email from SMTP_USER.
So my fix is change code in /opt/odoo/odoo-server/openerp/addons/base/ir/ir_mail_server.py
You need to change "smtp_from" to "smtp_user" and also replace message['from'] to smtp_user
smtp = self.connect(smtp_server, smtp_port, smtp_user, smtp_password, smtp_encryption or False, smtp_debug)
#smtp.sendmail(smtp_from, smtp_to_list, message.as_string())
#AIO FIXX 20150308 : Because of Zoho mail does not allow relay mail
#That means the mail must sent from smtp_user
#so we replace smtp_from => smtp_user
#Also need to replace message['From'] to smtp_user
#Here we only replace email address part but keep email name
#example: AIO Robotics Inc. <firstname.lastname@example.org> to AIO Robotics Inc. <smtp_user email>
from email.utils import parseaddr,formataddr
(oldname,oldemail) = parseaddr(message['From']) #exact name and address
newfrom = formataddr((oldname,smtp_user)) #use original name with new address
message.replace_header('From', newfrom) #need to use replace_header instead '=' to prevent double field
smtp.sendmail(smtp_user, smtp_to_list, message.as_string())
if smtp is not None:
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 5/1/14, 7:56 PM|
|Seen: 5976 times|
|Last updated: 3/7/18, 11:24 AM|