Skip to content

Commit dafb7bb

Browse files
committed
Merge PR #1035 into 16.0
Signed-off-by hbrunn
2 parents a2120a1 + ec06042 commit dafb7bb

19 files changed

Lines changed: 1374 additions & 0 deletions

File tree

mail_outbound_static/README.rst

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
====================
2+
Mail Outbound Static
3+
====================
4+
5+
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6+
!! This file is generated by oca-gen-addon-readme !!
7+
!! changes will be overwritten. !!
8+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9+
10+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
11+
:target: https://odoo-community.org/page/development-status
12+
:alt: Beta
13+
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
14+
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
15+
:alt: License: LGPL-3
16+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github
17+
:target: https://github.com/OCA/social/tree/15.0/mail_outbound_static
18+
:alt: OCA/social
19+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
20+
:target: https://translation.odoo-community.org/projects/social-15-0/social-15-0-mail_outbound_static
21+
:alt: Translate me on Weblate
22+
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
23+
:target: https://runbot.odoo-community.org/runbot/205/15.0
24+
:alt: Try me on Runbot
25+
26+
|badge1| |badge2| |badge3| |badge4| |badge5|
27+
28+
This module brings Odoo outbound emails in to strict compliance with RFC-2822
29+
by allowing for a dynamically configured From header, with the sender's e-mail
30+
being appended into the proper Sender header instead. To accomplish this we:
31+
32+
* Add a domain whitelist field in the mail server model. This one represent an
33+
allowed Domains list separated by commas. If there is not given SMTP server
34+
it will let us to search the proper mail server to be used to send the messages
35+
where the message 'From' email domain match with the domain whitelist. If
36+
there is not mail server that matches then will use the default mail server to
37+
send the message.
38+
39+
* Add a Email From field that will let us to email from a specific address taking
40+
into account this conditions:
41+
42+
1) If the sender domain match with the domain whitelist then the original
43+
message's 'From' will remain as it is and will not be changed because the
44+
mail server is able to send in the name of the sender domain.
45+
46+
2) If the original message's 'From' does not match with the domain whitelist
47+
then the email From is replaced with the Email From field value.
48+
49+
* Add compatibility to define the smtp information in Odoo config file. Both
50+
smtp_from and smtp_whitelist_domain values will be used if there is not mail
51+
server configured in the system.
52+
53+
**Table of contents**
54+
55+
.. contents::
56+
:local:
57+
58+
Usage
59+
=====
60+
61+
* Navigate to an Outbound Email Server
62+
* Set the `Email From` option to an email address
63+
* Set the `Domain Whitelist` option with the domain whitelist
64+
65+
Bug Tracker
66+
===========
67+
68+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/social/issues>`_.
69+
In case of trouble, please check there if your issue has already been reported.
70+
If you spotted it first, help us smashing it by providing a detailed and welcomed
71+
`feedback <https://github.com/OCA/social/issues/new?body=module:%20mail_outbound_static%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
72+
73+
Do not contact contributors directly about support or help with technical issues.
74+
75+
Credits
76+
=======
77+
78+
Authors
79+
~~~~~~~
80+
81+
* brain-tec AG
82+
* LasLabs
83+
* Adhoc SA
84+
85+
Contributors
86+
~~~~~~~~~~~~
87+
88+
* Frédéric Garbely <frederic.garbely@braintec-group.com>
89+
* Dave Lasley <dave@laslabs.com>
90+
* Lorenzo Battistini <https://github.com/eLBati>
91+
* Pierre Pizzetta <pierre@devreaction.com>
92+
* Katherine Zaoral <kz@adhoc.com.ar>
93+
* Juan José Scarafía <jjs@adhoc.com.ar>
94+
95+
Maintainers
96+
~~~~~~~~~~~
97+
98+
This module is maintained by the OCA.
99+
100+
.. image:: https://odoo-community.org/logo.png
101+
:alt: Odoo Community Association
102+
:target: https://odoo-community.org
103+
104+
OCA, or the Odoo Community Association, is a nonprofit organization whose
105+
mission is to support the collaborative development of Odoo features and
106+
promote its widespread use.
107+
108+
This module is part of the `OCA/social <https://github.com/OCA/social/tree/15.0/mail_outbound_static>`_ project on GitHub.
109+
110+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

mail_outbound_static/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright 2017 LasLabs Inc.
2+
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
3+
4+
from . import models
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright 2016-2022 LasLabs Inc.
2+
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
3+
4+
{
5+
"name": "Mail Outbound Static",
6+
"summary": "Allows you to configure the from header for a mail server.",
7+
"version": "16.0.1.0.0",
8+
"category": "Discuss",
9+
"website": "https://github.com/OCA/social",
10+
"author": "brain-tec AG, LasLabs, Adhoc SA, Odoo Community Association (OCA)",
11+
"license": "LGPL-3",
12+
"application": False,
13+
"installable": True,
14+
"depends": ["base"],
15+
"data": ["views/ir_mail_server_view.xml"],
16+
}

mail_outbound_static/i18n/es.po

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * mail_outbound_static
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 13.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2020-09-03 12:53+0000\n"
10+
"PO-Revision-Date: 2020-09-03 12:53+0000\n"
11+
"Last-Translator: \n"
12+
"Language-Team: \n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: \n"
17+
18+
#. module: mail_outbound_static
19+
#: code:addons/mail_outbound_static/models/ir_mail_server.py:0
20+
#, python-format
21+
msgid ""
22+
"%s is not a valid domain. Please define a list of valid domains separated by"
23+
" comma"
24+
msgstr ""
25+
"%s no es un dominio válido. Por favor defina una lista de dominios validos separados por"
26+
" comas"
27+
28+
#. module: mail_outbound_static
29+
#: model:ir.model.fields,help:mail_outbound_static.field_ir_mail_server__domain_whitelist
30+
msgid ""
31+
"Allowed Domains list separated by commas. If there is not given SMTP server "
32+
"it will let us to search the proper mail server to be used to sent the "
33+
"messages where the message 'From' email domain match with the domain "
34+
"whitelist."
35+
msgstr ""
36+
"Lista de dominios permitidos separados por comas. Si no se ha seleccionado "
37+
"un servidor SMTP nos permitirá seleccionar el servidor de mail apropiado "
38+
"para enviar los mensajes donde el dominio del email del 'De' coincida con la"
39+
" lista blanca de dominios."
40+
41+
#. module: mail_outbound_static
42+
#: model:ir.model.fields,field_description:mail_outbound_static.field_ir_mail_server__domain_whitelist
43+
msgid "Domain Whitelist"
44+
msgstr "Lista blanca de dominios"
45+
46+
#. module: mail_outbound_static
47+
#: model:ir.model.fields,field_description:mail_outbound_static.field_ir_mail_server__smtp_from
48+
msgid "Email From"
49+
msgstr "Email De"
50+
51+
#. module: mail_outbound_static
52+
#: model:ir.model,name:mail_outbound_static.model_ir_mail_server
53+
msgid "Mail Server"
54+
msgstr "Servidor de correo"
55+
56+
#. module: mail_outbound_static
57+
#: code:addons/mail_outbound_static/models/ir_mail_server.py:0
58+
#, python-format
59+
msgid "Not a valid Email From"
60+
msgstr "No es un Email De válido"
61+
62+
#. module: mail_outbound_static
63+
#: model:ir.model.fields,help:mail_outbound_static.field_ir_mail_server__smtp_from
64+
msgid ""
65+
"Set this in order to email from a specific address. If the original "
66+
"message's 'From' does not match with the domain whitelist then it is "
67+
"replaced with this value. If does match with the domain whitelist then the "
68+
"original message's 'From' will not change"
69+
msgstr ""
70+
"Definalo para usar un dirección de correo 'De' especifica. Si el 'De' del "
71+
"mensaje original no coincide con la lista blanca de dominios entonces este "
72+
"será remplazado con este valor. Si coincide con la lista blanca de dominios "
73+
"entonces el 'De' del mensajee original no cambiará"
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * mail_outbound_static
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 15.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: \n"
10+
"Language-Team: \n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: \n"
14+
"Plural-Forms: \n"
15+
16+
#. module: mail_outbound_static
17+
#: code:addons/mail_outbound_static/models/ir_mail_server.py:0
18+
#, python-format
19+
msgid ""
20+
"%s is not a valid domain. Please define a list of valid domains separated by"
21+
" comma"
22+
msgstr ""
23+
24+
#. module: mail_outbound_static
25+
#: model:ir.model.fields,help:mail_outbound_static.field_ir_mail_server__domain_whitelist
26+
msgid ""
27+
"Allowed Domains list separated by commas. If there is not given SMTP server "
28+
"it will let us to search the proper mail server to be used to sent the "
29+
"messages where the message 'From' email domain match with the domain "
30+
"whitelist."
31+
msgstr ""
32+
33+
#. module: mail_outbound_static
34+
#: model:ir.model.fields,field_description:mail_outbound_static.field_ir_mail_server__domain_whitelist
35+
msgid "Domain Whitelist"
36+
msgstr ""
37+
38+
#. module: mail_outbound_static
39+
#: model:ir.model.fields,field_description:mail_outbound_static.field_ir_mail_server__smtp_from
40+
msgid "Email From"
41+
msgstr ""
42+
43+
#. module: mail_outbound_static
44+
#: model:ir.model,name:mail_outbound_static.model_ir_mail_server
45+
msgid "Mail Server"
46+
msgstr ""
47+
48+
#. module: mail_outbound_static
49+
#: code:addons/mail_outbound_static/models/ir_mail_server.py:0
50+
#, python-format
51+
msgid "Not a valid Email From"
52+
msgstr ""
53+
54+
#. module: mail_outbound_static
55+
#: model:ir.model.fields,help:mail_outbound_static.field_ir_mail_server__smtp_from
56+
msgid ""
57+
"Set this in order to email from a specific address. If the original "
58+
"message's 'From' does not match with the domain whitelist then it is "
59+
"replaced with this value. If does match with the domain whitelist then the "
60+
"original message's 'From' will not change"
61+
msgstr ""
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright 2017 LasLabs Inc.
2+
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
3+
4+
from . import ir_mail_server

0 commit comments

Comments
 (0)