odoo / odoo

Odoo. Open Source Apps To Grow Your Business.
https://www.odoo.com
Other
38.81k stars 25.15k forks source link

Wrong error message when failed to send mail - misleading #1493

Closed litnimax closed 5 years ago

litnimax commented 10 years ago

The log is well describing the issue:

2014-07-31 20:41:44,404 2407 DEBUG odoo_ivrvoice openerp.addons.base.ir.ir_mail_server: data: 2014-07-31 20:41:44,404 2407 DEBUG odoo_ivrvoice openerp.addons.base.ir.ir_mail_server:
2014-07-31 20:41:44,404 2407 DEBUG odoo_ivrvoice openerp.addons.base.ir.ir_mail_server: (553, 'Relaying disallowed') 2014-07-31 20:41:44,404 2407 DEBUG odoo_ivrvoice openerp.addons.base.ir.ir_mail_server:

2014-07-31 20:41:44,404 2407 DEBUG odoo_ivrvoice openerp.addons.base.ir.ir_mail_server: send: 2014-07-31 20:41:44,404 2407 DEBUG odoo_ivrvoice openerp.addons.base.ir.ir_mail_server:
2014-07-31 20:41:44,404 2407 DEBUG odoo_ivrvoice openerp.addons.base.ir.ir_mail_server: 'rset\r\n' 2014-07-31 20:41:44,404 2407 DEBUG odoo_ivrvoice openerp.addons.base.ir.ir_mail_server:

2014-07-31 20:41:44,405 2407 DEBUG odoo_ivrvoice openerp.addons.base.ir.ir_mail_server: send: 2014-07-31 20:41:44,405 2407 DEBUG odoo_ivrvoice openerp.addons.base.ir.ir_mail_server:
2014-07-31 20:41:44,405 2407 DEBUG odoo_ivrvoice openerp.addons.base.ir.ir_mail_server: 'quit\r\n' 2014-07-31 20:41:44,405 2407 DEBUG odoo_ivrvoice openerp.addons.base.ir.ir_mail_server:

2014-07-31 20:41:44,405 2407 DEBUG odoo_ivrvoice openerp.tools.translate: no translation language detected, skipping translation for ""Mail delivery failed via SMTP server '%s'.\n%s: %s"" 2014-07-31 20:41:44,405 2407 ERROR odoo_ivrvoice openerp.addons.base.ir.ir_mail_server: Mail delivery failed via SMTP server 'smtp.zoho.com'. SMTPServerDisconnected: please run connect() first 2014-07-31 20:41:44,405 2407 DEBUG odoo_ivrvoice openerp.tools.translate: no translation language detected, skipping translation for "'Mail Delivery Failed'" 2014-07-31 20:41:44,406 2407 ERROR odoo_ivrvoice openerp.addons.mail.mail_mail: failed sending mail.mail 63 Traceback (most recent call last): File "/srv/odoo/addons/mail/mail_mail.py", line 293, in send context=context) File "/srv/odoo/openerp/api.py", line 204, in wrapper return old_api(self, _args, *_kwargs) File "/srv/odoo/openerp/addons/base/ir/ir_mail_server.py", line 483, in sendemail raise MailDeliveryException(("Mail Delivery Failed"), msg) MailDeliveryException: ('Mail Delivery Failed', u"Mail delivery failed via SMTP server 'smtp.zoho.com'.\nSMTPServerDisconnected: please run connect() first")

cunguito commented 9 years ago

Same here, did you got this working?

joanbarros commented 9 years ago

I found a question/answer that explains how to work around this issue. I think this work around is ok but a better solution should be put in place.

Gmail actually solves this transparently and in a very elegant manner. It uses the authentication name and address by default but adds a "Reply-To" header with the original name and address the email was going to be sent with.

I think an option should be added to allow the user to select wether it wants to use this behaviour in order to make it work with SMTP servers that do not allow relaying (like zoho.com for example).

PD: I'll start working on a fix just in case.

gregpm commented 8 years ago

Hi Joanbarros, Just wondering if you ever found any other way to fix this. Thanks!

tkontogi commented 8 years ago

Hello All,

Any update on that?

joanbarros commented 8 years ago

@gregpm sorry, got sidetracked and have not worked with Odoo in a while. For some reason I missed the notification for your comment, sorry about that as well.

I'll be working on it this week and probably could take a look at this issue. But no promises. :/

Let you know if I ever get around working on this.

zoell commented 7 years ago

May I ask if this problem is resolved?

qb7 commented 6 years ago

May I ask if this problem is resolved?

pedrobaeza commented 6 years ago

@odony you marked this as wishlist. Is there currently any improvement over the message or the general mechanism? Can this be closed?

odony commented 6 years ago

The issue described in the title is actually still valid. If anyone wants to test a possible fix for the incorrect error message, you can try c691d115efa19d5eaec00c5d03e88287ff6a55b7.

As for the rest of the discussion with the zoho setup, this is simply not a supported use case. Odoo acts as a mail hub and needs to be able to relay messages from arbitrary addresses, to arbitrary addresses. It requires a full SMTP relay, not a personal SMTP service. Using a restricted service such as GMail's personal SMTP, or similar services like zoho may appear to work but actually many features will be severely broken (replies, routing, etc.)

pedrobaeza commented 6 years ago

Thanks for the follow-up, Oliver. I let the issue opened until you merge the commit, or if you want to close it, go ahead.

pedrobaeza commented 6 years ago

@odony any news about merging the commit in master?

odony commented 6 years ago

Actually, I was waiting for @tde-banana-odoo's feedback on that patch ;-)

sswapnesh commented 6 years ago

@odony Any update on this ? This is still happening on latest v12. (Using Zoho service)

vishal-keypress commented 5 years ago

Hello Guys

here is the module to fix the issue

https://apps.odoo.com/apps/modules/13.0/zoho_mail_fix_spt/

Demo: https://youtu.be/XFofqLoa4ic

sswapnesh commented 5 years ago

@vishal7874

Is it still happening on v13 as well?

vishal-keypress commented 5 years ago

@vishal7874

Is it still happening on v13 as well?

yes, it is not issued with odoo it is an issue with Zoho if you are using Google as your mail provider then everything works well in all odoo version