SMTP for Odoo — invoices and quotations that arrive
Odoo sends the mail that keeps your administration running: quotations, invoices, reminders and order confirmations. Exactly the kind of messages you cannot afford to merely hope will arrive.
Odoo has its own setting for outgoing mail servers, where you specify an external SMTP server. That is the clean solution right away: your Odoo server then does not have to build up a mail reputation of its own, and you do not depend on the default settings of your hosting environment.
Why it goes wrong without a relay
A self-hosted Odoo often runs on a server that has never sent mail before. Such an IP address has no history whatsoever, and an address without history is distrusted by default. An invoice that consequently lands in the spam folder gets paid late or not at all.
Setting up SMTP in Odoo
Collect your details
Log in to your 2mail account and retrieve your SMTP server, username and password there.
Fill them in inside Odoo
Odoo's settings include a section for outgoing mail servers. Add a server there with the SMTP details below. Odoo offers a test button to check the connection immediately — use it, so you do not find out at the first real invoice that something is wrong.
Authenticate your domain
Make sure SPF, DKIM and DMARC are set correctly for your domain, so recipients can verify that the mail comes from you.
Test
Send a test message to an address at a major provider and check that it arrives in the inbox and not in the spam folder.
The fields Odoo asks for
Every platform names them slightly differently, but it is always the same five. The actual values are tied to your account and can be found in your 2mail account — take them from there, so you are sure to use the right ones.
| Field | What you enter |
|---|---|
| SMTP server (host) | The server name from your 2mail account. |
| Port | The port that matches your chosen encryption; your account shows which one. |
| Encryption | TLS. Never send unencrypted — your credentials would otherwise travel in plain text. |
| Username | The SMTP login of your 2mail account. |
| Password | The matching password. Never use the password of an employee's mailbox. |
Which emails Odoo sends
As soon as the relay is set up, all of these run through 2mail — you do not have to configure them one by one.
Pitfalls with Odoo
One outgoing server as default
Odoo lets you define multiple outgoing mail servers, each with a priority. If an old or broken server with a higher priority is still around, Odoo will use it. Clean up unused servers.
Set the sender domain correctly
Have Odoo send from an address on your own domain — the same domain the authentication records are set up for. A sender on a different domain undermines the whole setup.
Watch out for mass sends
A reminder run to your entire customer base is a spike. If you are sending it for the first time, spread it out instead of sending everything at once.
A different platform?
SMTP is a standard protocol: any system that speaks SMTP — a CRM, an ERP, a custom application or a server — can send through 2mail using the same five fields.