This module allows to configure the incoming and outgoing mail servers using the server_environment mechanism: you can then have different mail servers for the production and the test environment.
auto_awesome What this module does
AI-generated from the code · Odoo 19.0Lets you manage incoming and outgoing mail server settings from external configuration files instead of typing them in Odoo, so production and test environments can use different mail servers.
This module connects Odoo's mail server settings to the server environment mechanism, which reads configuration from external files rather than from the database.
- Outgoing email servers (
ir.mail_server) take their host, port, username, password, encryption and authentication settings from an "outgoing_mail" configuration section. - Incoming mail servers (
fetchmail.server) take their server address, port, type, user, password, SSL flag, attachment and original-message options from an "incoming_mail" configuration section.
Because these values come from files, the same database can behave differently in production and in a test environment without anyone editing the mail server records by hand.
The module also makes the SSL flag and server type on incoming servers, and the username and host on outgoing servers, searchable, so you can filter mail server lists on those values.
When the module is uninstalled, a cleanup routine recreates the database columns that were removed for these mail models and fills them with the current effective values, so the database stays usable. An Odoo server restart is required after uninstalling.
It touches the mail area only: the incoming and outgoing mail server configuration screens.
Depends on
Required by other modules
Models and fields (2)
- ir.mail_server · new modelsmtp_host, smtp_user
- fetchmail.server · new modelis_ssl, server_type
Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 8 confirmed, 1 with no information of 9 versions.
Sources · Odoo 19.0
Confirmed on 2026-11-03 in branch 19.0 of OCA/server-env.
terminal Installation and usage
OCA documentation · Odoo 19.0Installation
Source · Odoo 19.0To install this module, you need to have the server_environment module installed and properly configured.
Configuration
Source · Odoo 19.0With this module installed, the incoming and outgoing mail servers are configured in the server_environment_files module (which is a module you should provide, see the documentation of server_environment for more information).
In the configuration file of each environment, you may first use the sections [outgoing_mail] and [incoming_mail] to configure the default values respectively for SMTP servers and the IMAP/POP servers.
Then for each server, you can define additional values or override the default values with a section named [outgoing_mail.resource_name] or [incoming_mail.resource_name] where "resource_name" is the name of the server.
Example of config file :
[outgoing_mail] smtp_host = smtp.myserver.com smtp_port = 587 smtp_user = smtp_pass = smtp_encryption = ssl
[outgoing_mail.odoo_smtp_server1] smtp_user = odoo smtp_pass = odoo
[incoming_mail.odoo_pop_mail1] server = mail.myserver.com port = 110 server_type = pop is_ssl = 0 attach = 0 original = 0 user = odoo@myserver.com password = uas1ohV0
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".
Usage
Source · Odoo 19.0Once configured, Odoo will read the mail servers values from the configuration file related to each environment defined in the main Odoo file.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.