New guide: how to warm up a dedicated IP without hurting your reputation. Read now →
Log in
MigoSMTP
SMTP and APIUpdated 4 Nov 2026

Odoo Outgoing Mail Server: SMTP Setup and Troubleshooting

Set up an Odoo outgoing mail server with authenticated SMTP, choose the right connection security, control the From address, understand the mail queue and fix the errors that stop quotes, invoices and notifications.

KM
Written by Kwame Mensah
Billing and Account Specialist
Reviewed by Sana Qureshi
  • Published18 Mar 2023
  • Read time7 min
  • Length1,339 words
Share this guide

In Odoo, you configure outgoing email under Settings, Technical, Outgoing Mail Servers (developer mode must be active to see the Technical menu). Create a server record with your SMTP host, port, connection security and credentials, press Test Connection, then send a real message from a quote or invoice. For self-hosted instances, the same defaults can be placed in odoo.conf. A message that stays in the mail queue or bounces is nearly always a credentials, port, security mode or sender-address problem.

Menu names and fields change between Odoo versions and between Odoo Online, Odoo.sh and on-premise installs, so check the documentation for yours. This guide covers the concepts that stay the same.

MenuSettings, Technical, Outgoing Mail Servers (developer mode)
Typical valuesPort 587 with TLS (STARTTLS) or 465 with SSL/TLS
QueueMessages wait in Technical, Email, Emails until the queue job sends them
SenderUse an authenticated domain and set the From filter

How Odoo sends email

When a user sends a quote, an invoice, a helpdesk reply or a chatter message, Odoo creates a mail record and either sends it immediately or places it in a queue that a scheduled action processes. The transport is whatever outgoing mail server record matches the sender, or the defaults from the configuration file. If nothing is configured, Odoo tries the local host on port 25, which fails on most modern servers. For the underlying protocol, see what SMTP is.

Create the outgoing mail server record

  1. Activate developer mode, then open Settings, Technical, Outgoing Mail Servers and create a new record.
  2. Description: a clear label such as Production relay.
  3. SMTP Server: the host name from your provider, for example smtp.migosmtp.com.
  4. SMTP Port: 587 for STARTTLS or 465 for implicit TLS.
  5. Connection Security: choose the option that matches the port: TLS (STARTTLS) for 587, SSL/TLS for 465. Do not choose None for an internet-facing relay.
  6. Username and Password: the SMTP credentials. Use credentials created for the application, not a personal mailbox.
  7. Save, then use Test Connection. A success message confirms login and encryption, not delivery to an inbox.
PortSecurity optionNotes
587TLS (STARTTLS)The standard submission port; connection starts plain, then upgrades
465SSL/TLSEncrypted from the first byte; many providers support it
25Usually avoidOften blocked outbound and not meant for client submission
2525 or othersProvider specificOnly if your provider documents it

The comparison between these options is covered in choosing between ports 25, 465 and 587.

Configuration file defaults for self-hosted installs

For on-premise or Odoo.sh style deployments where you control the configuration, defaults can be set in odoo.conf. These are used when no outgoing mail server record applies. The record in the database takes priority for most use, so keep the two consistent to avoid confusion.

[options]
smtp_server = smtp.migosmtp.com
smtp_port = 587
smtp_user = YOUR_SMTP_USERNAME
smtp_password = YOUR_SMTP_PASSWORD
smtp_ssl = True
email_from = [email protected]

The meaning of the encryption options in the configuration file differs between versions (for example, older versions use a boolean for SSL while newer ones separate STARTTLS and SSL). Confirm the parameter names against the command line reference for your release before copying this block. Keep passwords out of version control; use environment-specific files or a secrets mechanism.

Control the From address

Authenticated SMTP services allow only senders on domains you verified. Odoo, however, may try to send as the user's own address or as a company address. If those addresses do not belong to an authenticated domain, the relay rejects them or receivers mark them as forged. Use these controls:

  • From Filtering on the outgoing server record, available in current versions, so that a server is only used for matching addresses or domains.
  • A company-wide notification address, defined through the system parameters and the email domain settings, so notifications leave from one authenticated address and the user's name appears in the display name. The default email domain is configured through the alias domain settings of your version.
  • Reply-To set to the user so that responses reach the right person while the technical sender remains stable.
  • One outgoing server per domain if you send from several brands, with a different From filter each.

Authenticate every sending domain with SPF, DKIM and DMARC; see authenticating your sending domain. Without it, quotes and invoices tend to reach spam, which is expensive when customers wait for payment details. If a message is rejected because of a mismatched address, read 553 sender address rejected.

The mail queue

Many Odoo messages are not sent in the user's click. They are stored and processed by a scheduled action named something like Mail: Email Queue Manager, which runs periodically. If scheduled actions or the cron workers are stopped, the queue grows and nothing leaves. Open Settings, Technical, Email, Emails to inspect the records. The status field shows outgoing, sent, received, exception or cancelled, and the failure reason is stored on the record. Retrying an exception record resubmits it after you fix the cause.

  • Outgoing for a long time: the queue job is not running, or the server is slow or unreachable.
  • Exception with an SMTP code: the relay rejected the message. Read the code and the text.
  • Sent but not received: the relay accepted it; check the recipient's spam folder and your provider logs. See delivered but not received.

Test from outside Odoo

If Test Connection fails, test the same credentials from the Odoo server shell, because a firewall on that host is the usual culprit. The command line testing guide shows how.

openssl s_client -starttls smtp -connect smtp.migosmtp.com:587 -crlf
# or, for implicit TLS
openssl s_client -connect smtp.migosmtp.com:465 -crlf

Troubleshooting

SymptomLikely causeFix
Authentication failed on Test ConnectionWrong username, password or security modeRe-enter credentials; see the 535 guide
Connection timed outOutbound firewall or hosting blockOpen outbound 587 or 465, or ask the host
SSL: WRONG_VERSION_NUMBERSSL/TLS chosen for a STARTTLS portUse TLS (STARTTLS) with 587 or SSL/TLS with 465
Certificate verify failedMissing CA certificates on the serverUpdate the CA bundle
Relay rejects the senderFrom address not allowed for the accountUse From filtering and an authenticated domain
Emails stay in outgoingQueue action disabled or workers not runningEnable the scheduled action and check workers
Spam placementNo SPF, DKIM or DMARCAuthenticate the domain and review content
Rate limit errorsBurst of messages exceeds provider limitsSpread sends and respect provider limits

The authentication failure code is described in SMTP 535 authentication failed.

Staging and test databases

A restored copy of the production database keeps the production outgoing mail server record. Anyone who tests workflows on that copy can email real customers. Before using a staging database, deactivate or replace the outgoing server with a catcher, or enable the feature your Odoo version provides to neutralize a database copy. Our guide on testing email in staging explains safe patterns.

Next steps

After the server record works, authenticate the domain, set the From filter and the notification address, send a quote, an invoice and a chatter message, and read the headers of each. Track failures from the Emails list on a schedule. If volume grows, consider an API-based integration or a relay with delivery events so that you can see bounces in one place.

Operational habits for Odoo mail

Review the Emails list on a regular schedule and filter on exception status. A small number of failed records for invalid recipient addresses is normal, while a sudden cluster with the same SMTP error points to an expired password, a changed provider setting or a blocked port. Clean up long-lived outgoing records that no longer apply, and set a clear naming convention if you maintain several servers for several brands.

When you upgrade Odoo or restore a backup to a new host, re-test the outgoing server before announcing the system is ready. The record is stored in the database, but firewall rules, DNS and secrets live outside it. Document who owns the SMTP credentials so that rotation does not become an emergency. If customers pay by following links in invoice emails, treat email health as part of cash collection and monitor it accordingly.

Give Odoo a dependable relay Use MigoSMTP authenticated SMTP for quotes, invoices and notifications.

Explore the SMTP relay

References and further reading

Frequently asked questions

Where do I configure outgoing mail in Odoo?

Enable developer mode and open Settings, Technical, Outgoing Mail Servers. Menu names can vary slightly by version.

Which connection security option should I use?

Choose TLS (STARTTLS) for port 587 or SSL/TLS for port 465, matching the port you entered.

Why are my Odoo emails stuck in outgoing?

The scheduled action that processes the mail queue may be disabled or the workers may not be running, or the SMTP server is unreachable.

Why do invoices from Odoo go to spam?

The sending domain is often not authenticated, or the From address does not match the domain your relay is allowed to send for.

Does Test Connection prove delivery?

No. It confirms connection, encryption and login to the SMTP server only. Send a real message and check the headers.

Topics#odoo#smtp#erp#outgoing mail#troubleshooting
Was this guide helpful?Your answer helps us improve our documentation.

Start sending in minutes.

Create an account, add your domain and send your first email.

Get started Talk to sales