Odoo How-To

How to Configure Email in Odoo

A complete guide to setting up outgoing and incoming mail servers in Odoo — covering SMTP, Gmail, Microsoft 365, catch-all aliases, and email deliverability best practices.

iWesabe Editorial TeamSeptember 16, 20229 min read

Odoo sends transactional emails — order confirmations, invoices, delivery notifications, CRM follow-ups — through a configured outgoing mail server. Without a properly configured server, emails are queued but never delivered, and Odoo's chatter (the activity log on each record) accumulates failed send attempts silently.

This guide covers outgoing mail server setup (SMTP, Gmail OAuth, Microsoft 365), incoming mail server setup for reply-tracking, catch-all aliases, and the most common email configuration problems with their fixes. A version notes section identifies the specific changes across Odoo 16–19 and the four items to verify when a new version ships.

Configuring the Outgoing Mail Server

  1. Navigate to Settings → Technical → Email → Outgoing Mail Servers and click New.
  2. Set a Name (e.g. "Company Gmail SMTP") for internal reference.
  3. Set the SMTP Server address, Port, and Connection Security (SSL/TLS, STARTTLS, or None). See the provider reference table below for the correct values for Gmail and Microsoft 365.
  4. Set Authentication to Username and enter the email address and password (or app password — see provider notes below).
  5. Click Test Connection. A success banner confirms the server is reachable and credentials are valid. A failure shows the SMTP error code.
  6. Save. The server is now active. Odoo routes all outgoing emails through the highest-priority active server (priority is set by the sequence number — lower number = higher priority).

SMTP Settings by Provider

Outgoing Mail Server — Provider SMTP Reference
ProviderSMTP serverPortSecurityAuthentication note
Gmail (Google Workspace)smtp.gmail.com465 (SSL) or 587 (STARTTLS)SSL/TLS on 465; STARTTLS on 587Google Workspace: use email + password. Personal Gmail: 2FA must be enabled; generate a 16-character App Password at myaccount.google.com → Security → App Passwords.
Microsoft 365 (Exchange Online)smtp.office365.com587STARTTLSModern Auth (OAuth2) recommended — requires Azure AD app registration. Basic Auth (username + password) was deprecated in 2022 for consumer accounts; still available for M365 Business with explicit tenant policy.
Amazon SESemail-smtp.<region>.amazonaws.com587 (STARTTLS) or 465 (SSL)STARTTLS or SSL/TLSUse SMTP credentials from AWS IAM (not root account credentials). Verify sending domain in SES before production use. SES has a default sending limit — request a production limit increase.
SendGridsmtp.sendgrid.net587STARTTLSUsername is always the literal string `apikey`. Password is the SendGrid API key (starts with SG.). Verify sender identity in SendGrid before sending.
Custom / on-premise mail serverYour mail server hostnamePer your server configPer your server configEnsure the Odoo server IP is whitelisted in your mail server's relay rules. SPF record must include the Odoo server's IP or sending domain.

Alias Domain and Catch-All Address

Odoo generates reply-to addresses for records automatically — for example, `sales+order-42@yourcompany.com`. For this to work, you must configure an alias domain so Odoo knows which domain to use for these auto-generated addresses.

After setting the alias domain, Odoo can route inbound replies back to the correct record automatically. When a customer replies to an order confirmation email, the reply appears in the order's chatter — no manual processing required. For this routing to work, you must also configure an incoming mail server (see the next section).

Configuring the Incoming Mail Server

Incoming Mail Server — Field Reference
FieldDescriptionTypical value
NameInternal label for this server"Catch-All Inbox" or "Support Mailbox"
Server TypeIMAP (recommended) or POP3. IMAP leaves messages on the server; POP3 deletes after fetch.IMAP
Server NameHostname of your mail provider's IMAP serverimap.gmail.com / outlook.office365.com
PortIMAP port993 (SSL/TLS) or 143 (STARTTLS)
AuthenticationUsername + password, or OAuth2 for Gmail/M365Email address + App Password
Actions to Perform on Incoming EmailsWhat Odoo does when it fetches a new email. Default: match to existing record via alias; create new if no match.Leave as default for catch-all routing

Email Deliverability — SPF, DKIM, and DMARC

Configuring the SMTP server is not enough. Without correct DNS records, Odoo emails land in spam or are silently rejected by recipient mail servers. Three DNS records control deliverability:

Email Deliverability DNS Records
RecordPurposeWhat to add for OdooWhere to configure
SPF (TXT record)Declares which mail servers are authorised to send on behalf of your domainAdd the Odoo server IP or sending provider's SPF include. Example: `v=spf1 include:_spf.google.com ~all` for Gmail Workspace.Your domain registrar or DNS provider (e.g. Cloudflare, Route 53, GoDaddy)
DKIM (TXT record)Cryptographically signs outgoing emails so recipients can verify they were not tampered withGenerated by your email sending service (Gmail, SendGrid, SES). Copy the DKIM TXT record value from the provider console and add it to DNS.Your domain registrar or DNS provider
DMARC (TXT record)Tells recipient mail servers what to do when SPF/DKIM checks fail — quarantine, reject, or noneStart with a monitoring policy: `v=DMARC1; p=none; rua=mailto:dmarc@yourcompany.com`. Move to `p=quarantine` then `p=reject` after reviewing reports.Your domain registrar or DNS provider

Common Email Configuration Problems and Fixes

Odoo Email Troubleshooting Reference
SymptomRoot causeFix
Emails stuck in queue — chatter shows "pending" indefinitelyNo active outgoing mail server, or server credentials are invalidGo to Settings → Technical → Email → Outgoing Mail Servers and run Test Connection. Fix any authentication error shown.
Gmail SMTP: "Username and Password not accepted" errorGoogle disabled less-secure app access; normal password no longer worksEnable 2FA on the Google account, then generate a 16-character App Password at myaccount.google.com → Security → App Passwords. Use the App Password in Odoo.
Microsoft 365: "5.7.57 Client not authenticated" SMTP errorBasic Auth (username + password) is disabled at the tenant levelEnable SMTP AUTH for the sending mailbox in the Microsoft 365 admin centre: Users → Select user → Mail → Manage email apps → enable Authenticated SMTP. Alternatively, configure OAuth2.
Emails delivered but landing in recipient spamMissing or failing SPF/DKIM/DMARC recordsVerify your SPF record includes the sending server. Add a DKIM record from your email provider. Add a DMARC record starting with p=none. Use MXToolbox (mxtoolbox.com) to check all three.
Customer replies do not appear in the record chatterNo incoming mail server configured, or alias domain not setConfigure an incoming mail server (IMAP) for the catch-all mailbox. Set the alias domain in Settings → General Settings → Discuss → Alias Domain.

Version Notes and Spot-Check Guide

Odoo Email Configuration — Changes by Version
Odoo versionOutgoing server pathAlias domain locationNotable change
Odoo 16Settings → Technical → Email → Outgoing Mail ServersSettings → Technical → Email → Alias DomainsOAuth2 authentication added for Gmail and Microsoft 365 as an alternative to App Passwords
Odoo 17Settings → Technical → Email → Outgoing Mail ServersSettings → General Settings → Discuss → Alias Domain (moved)Alias domain moved out of Technical menu into General Settings → Discuss section
Odoo 18Settings → Technical → Email → Outgoing Mail ServersSettings → General Settings → Discuss → Alias DomainNo path changes. OAuth2 for Gmail and M365 confirmed stable.
Odoo 19Settings → Technical → Email → Outgoing Mail ServersSettings → General Settings → Discuss → Alias DomainNo path changes. Verified June 2026.

Need help configuring email for your Odoo production environment?

iWesabe configures outgoing mail, DKIM/SPF/DMARC, and alias routing as part of every Odoo go-live. Talk to our team.

WhatsApp

Frequently Asked Questions

Where is the outgoing mail server configuration in Odoo 19?
Settings → Technical → Email → Outgoing Mail Servers. Developer mode must be active to see the Technical menu. This path has been stable across Odoo 16, 17, 18, and 19.
How do I configure Gmail as the outgoing mail server in Odoo?
Use smtp.gmail.com, port 465 (SSL/TLS) or 587 (STARTTLS). For Google Workspace accounts, enter the email and password directly. For personal Gmail accounts, you must first enable 2-factor authentication, then generate a 16-character App Password at myaccount.google.com → Security → App Passwords, and use that App Password in Odoo instead of your regular password.
Why are Odoo emails going to spam?
The most common cause is missing SPF, DKIM, or DMARC DNS records. Check all three using MXToolbox (mxtoolbox.com → Email Health). SPF must include the sending server's IP or domain. DKIM must be published from your email provider's console. DMARC should be added starting with p=none to monitor without blocking. Also check that the From address domain matches the SPF/DKIM signing domain.
How do I set up the alias domain in Odoo so that customer replies go back into the chatter?
Two steps are required: (1) Set the alias domain in Settings → General Settings → Discuss → Alias Domain (enter your company domain, e.g. `yourcompany.com`). (2) Configure an incoming mail server (Settings → Technical → Email → Incoming Mail Servers) for the catch-all mailbox at that domain using IMAP. When both are configured, Odoo fetches inbound replies and routes them to the correct record chatter automatically.
Can I use multiple outgoing mail servers in Odoo?
Yes. Odoo supports multiple active outgoing mail servers simultaneously. Routing is controlled by the Priority (sequence number) field — Odoo always uses the lowest-priority-number server first. You can also restrict a server to a specific company in multi-company setups, ensuring each entity sends from its own domain.
What port should I use for Odoo SMTP — 465 or 587?
Port 465 uses SSL/TLS (the connection is encrypted from the start). Port 587 uses STARTTLS (the connection starts unencrypted then upgrades to TLS). Both are secure when configured correctly. Most modern mail providers support both; Gmail and SendGrid work well on port 587 with STARTTLS. Choose based on what your mail provider recommends — the security level is equivalent.
iWesabe Editorial Team

iWesabe Editorial Team

Practitioner insights on Odoo ERP, ZATCA compliance, and Saudi enterprise digital operations — written by iWesabe's consulting, finance, and engineering teams.

About iWesabe

Related Articles