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.
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
- Navigate to Settings → Technical → Email → Outgoing Mail Servers and click New.
- Set a Name (e.g. "Company Gmail SMTP") for internal reference.
- 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.
- Set Authentication to Username and enter the email address and password (or app password — see provider notes below).
- Click Test Connection. A success banner confirms the server is reachable and credentials are valid. A failure shows the SMTP error code.
- 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
| Provider | SMTP server | Port | Security | Authentication note |
|---|---|---|---|---|
| Gmail (Google Workspace) | smtp.gmail.com | 465 (SSL) or 587 (STARTTLS) | SSL/TLS on 465; STARTTLS on 587 | Google 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.com | 587 | STARTTLS | Modern 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 SES | email-smtp.<region>.amazonaws.com | 587 (STARTTLS) or 465 (SSL) | STARTTLS or SSL/TLS | Use 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. |
| SendGrid | smtp.sendgrid.net | 587 | STARTTLS | Username 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 server | Your mail server hostname | Per your server config | Per your server config | Ensure 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
| Field | Description | Typical value |
|---|---|---|
| Name | Internal label for this server | "Catch-All Inbox" or "Support Mailbox" |
| Server Type | IMAP (recommended) or POP3. IMAP leaves messages on the server; POP3 deletes after fetch. | IMAP |
| Server Name | Hostname of your mail provider's IMAP server | imap.gmail.com / outlook.office365.com |
| Port | IMAP port | 993 (SSL/TLS) or 143 (STARTTLS) |
| Authentication | Username + password, or OAuth2 for Gmail/M365 | Email address + App Password |
| Actions to Perform on Incoming Emails | What 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:
| Record | Purpose | What to add for Odoo | Where to configure |
|---|---|---|---|
| SPF (TXT record) | Declares which mail servers are authorised to send on behalf of your domain | Add 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 with | Generated 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 none | Start 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
| Symptom | Root cause | Fix |
|---|---|---|
| Emails stuck in queue — chatter shows "pending" indefinitely | No active outgoing mail server, or server credentials are invalid | Go to Settings → Technical → Email → Outgoing Mail Servers and run Test Connection. Fix any authentication error shown. |
| Gmail SMTP: "Username and Password not accepted" error | Google disabled less-secure app access; normal password no longer works | Enable 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 error | Basic Auth (username + password) is disabled at the tenant level | Enable 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 spam | Missing or failing SPF/DKIM/DMARC records | Verify 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 chatter | No incoming mail server configured, or alias domain not set | Configure 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 version | Outgoing server path | Alias domain location | Notable change |
|---|---|---|---|
| Odoo 16 | Settings → Technical → Email → Outgoing Mail Servers | Settings → Technical → Email → Alias Domains | OAuth2 authentication added for Gmail and Microsoft 365 as an alternative to App Passwords |
| Odoo 17 | Settings → Technical → Email → Outgoing Mail Servers | Settings → General Settings → Discuss → Alias Domain (moved) | Alias domain moved out of Technical menu into General Settings → Discuss section |
| Odoo 18 | Settings → Technical → Email → Outgoing Mail Servers | Settings → General Settings → Discuss → Alias Domain | No path changes. OAuth2 for Gmail and M365 confirmed stable. |
| Odoo 19 | Settings → Technical → Email → Outgoing Mail Servers | Settings → General Settings → Discuss → Alias Domain | No 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.
Frequently Asked Questions
Where is the outgoing mail server configuration in Odoo 19?
How do I configure Gmail as the outgoing mail server in Odoo?
Why are Odoo emails going to spam?
How do I set up the alias domain in Odoo so that customer replies go back into the chatter?
Can I use multiple outgoing mail servers in Odoo?
What port should I use for Odoo SMTP — 465 or 587?

iWesabe Editorial Team
Practitioner insights on Odoo ERP, ZATCA compliance, and Saudi enterprise digital operations — written by iWesabe's consulting, finance, and engineering teams.
Related Articles
How to Import Data in Odoo
A complete guide to importing records into Odoo using the built-in import wizard — covering CSV and Excel formats, field mapping, error handling, and best practices for large data sets.
Odoo ERP Data Security for Saudi Businesses: PDPL, NCA ECC, and the 2026 Bar
Audit-ready data-security architecture for Odoo ERP in Saudi Arabia — PDPL lawful basis, NCA Essential Cybersecurity Controls, NDMO data classification, hosting decisions, identity, and incident response.
Best Odoo ERP Software Provider in Saudi Arabia: 7 Buyer-Diligence Markers (2026)
What separates an audit-defensible Odoo partner from a sales pitch: certification chain, named-client references, regulatory depth (ZATCA / GOSI / PDPL), Arabic-hours support, commercial model, methodology, and exit clause — with the red flags to watch for.
Explore Related Solutions
CRM & Customer Relationship Management
Turn every lead into a closed deal. Odoo CRM gives your sales team a structured Kanban pipeline, automated follow-up sequences, and a 360° customer view — all connected natively to Accounting, Inventory, and Email Marketing.
ExploreFinancial Management
Automate your Saudi Arabia accounting — ZATCA Phase 2 e-invoicing, VAT returns, Zakat provisioning, multi-currency bank reconciliation, and real-time financial reporting — all inside one connected Odoo platform. Fully localised for KSA and the GCC by iWesabe.
ExploreSupply Chain Management
From purchase order to final delivery — Odoo Supply Chain connects procurement, multi-warehouse inventory, demand forecasting, and vendor management into one real-time platform. Purpose-configured for Saudi Arabia and the GCC by iWesabe.
ExploreManufacturing Management ERP
Run lean, traceable production with Odoo Manufacturing — work orders, Bills of Materials, quality control, and real-time OEE dashboards built for KSA factory floors.
Explore