odoo / documentation

Odoo documentation sources
https://www.odoo.com/documentation/
Creative Commons Attribution Share Alike 4.0 International
670 stars 6.84k forks source link

[15.0, 16.0] Removed mail default "From" feature? (params: mail.force.smtp.from, mail.dynamic.smtp.from) #5895

Open bobslee opened 1 year ago

bobslee commented 1 year ago

Impacted versions: 15, 16

Documentation doesn't match the Odoo implementation/code anymore, since version 15. This isn't an issue (ignore) for version 14, 13 (and maybe earlier).

According to documentation:

Both config params mail.force.smtp.from, mail.dynamic.smtp.from can be used to provide/override the outbound sender (From) address.

When obtaining and setup according to the documentation (links above), the outbound mails still result in error which the (documented) feature solved in version 14 and 13.

(example mail addresses non real-world):

SMTPRecipientsRefused: {'recipient@example.dev': (553, b'5.7.1 <sender@example.com>: Sender address rejected: not owned by user outbound@MTA-MAIL-PROVIDER.TLD')}

The implementation (code) exists in version 14, but not in version 15 and 16 (just search the params). See code in version 14 (which doesn't exist in 15, 16):

Currently: https://github.com/odoo/odoo/blob/14.0/odoo/addons/base/models/ir_mail_server.py#L356

thomas15v commented 9 months ago

This seems fixed in the documentation, it is still very confusing to implement. But I think the new feature is more dynamic then just setting a forced parameter.

To get the same behavior as with mail.force.smtp.from you set mail.default.from and mail.catchall.domain correctly. And as last step you make sure your outgoing email configuration has a proper from filter. Odoo will then look around and set the email with the default email address.