diff --git a/addons/website/controllers/form.py b/addons/website/controllers/form.py index a9674c0b4e6..b45c97207f0 100644 --- a/addons/website/controllers/form.py +++ b/addons/website/controllers/form.py @@ -173,6 +173,15 @@ class WebsiteForm(http.Controller): except ValueError: error_fields.append(field_name) + if dest_model._name == 'mail.mail' and field_name == 'email_from': + # As the "email_from" is used to populate the email_from of the + # sent mail.mail, it could be filtered out at sending time if no + # outgoing mail server "from_filter" match the sender email. + # To make sure the email contains that (important) information + # we also add it to the "custom message" that will be included + # in the body of the email sent. + custom_fields.append((_('email'), field_value)) + # If it's a custom field elif field_name != 'context': custom_fields.append((field_name, field_value)) diff --git a/addons/website/i18n/website.pot b/addons/website/i18n/website.pot index ccbf47dc44e..7cd49f18b85 100644 --- a/addons/website/i18n/website.pot +++ b/addons/website/i18n/website.pot @@ -10597,6 +10597,12 @@ msgstr "" msgid "eLearning" msgstr "" +#. module: website +#: code:addons/website/controllers/form.py:0 +#, python-format +msgid "email" +msgstr "" + #. module: website #. openerp-web #: code:addons/website/static/src/xml/website.xml:0