Skip to content

Commit

Permalink
Merge PR #196 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by gurneyalex
  • Loading branch information
OCA-git-bot committed Jun 28, 2024
2 parents 9706de4 + ea72167 commit cb72625
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mail_environment/models/ir_mail_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,19 @@ def _server_env_fields(self):
"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):
self.update({"smtp_authentication": "login"})

@api.model
def _server_env_global_section_name(self):
"""Name of the global section in the configuration files
Expand Down
7 changes: 7 additions & 0 deletions mail_environment/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>

0 comments on commit cb72625

Please sign in to comment.