Merge PR #140 into 15.0

Signed-off-by gurneyalex
This commit is contained in:
OCA-git-bot 2023-06-16 12:02:20 +00:00
commit 7a044ec9e7
2 changed files with 15 additions and 0 deletions

View File

@ -16,11 +16,19 @@ class IrMailServer(models.Model):
"smtp_port": {},
"smtp_user": {},
"smtp_pass": {},
"smtp_ssl_certificate": {}, # the value must be base64 encoded
"smtp_ssl_private_key": {}, # the value must be base64 encoded
"smtp_encryption": {},
"smtp_authentication": {
"compute_default": "_compute_default_authentication"
},
}
mail_fields.update(base_fields)
return mail_fields
def _compute_default_authentication(self):
return "login"
@api.model
def _server_env_global_section_name(self):
"""Name of the global section in the configuration files

View File

@ -38,3 +38,10 @@ Example of config file ::
You will need to create 2 records in the database, one outgoing mail
server with the field `name` set to "odoo_smtp_server1" and one
incoming mail server with the field `name` set to "odoo_pop_mail1".
It is possible to use a SSL certificate for SMTP authentication. In this case,
you need to set the following entries in the configuration entry ::
smtp_authentication = certificate
smtp_ssl_certificate = <base64 encoded certificate>
smtp_ssl_private_key = <base64 encoded certificate>