Setting up the outgoing mail server in Odoo
Odoo sends quotes, invoices, reminders and notifications through an outgoing mail server that you define yourself. Point it at 2Mail and all those messages leave with an authenticated sender, with a log entry per message, and without your own mailbox hitting the limits of your mail provider.
What you need
- the server name shown in your 2mail account
- an SMTP login with password, created in the dashboard for your Odoo environment
- the sender address Odoo may use, on a domain registered as a sending domain in your account
- administrator rights in Odoo and developer mode, because the mail server settings are technical settings
Step 1: create the outgoing mail server
In the general settings, go to the outgoing mail servers and create a new one. Give it a description and a low priority value: Odoo tries servers in order of priority, and you want 2Mail to come first.
Step 2: connection and sign-in
Enter the server name from your 2mail account, choose port 587 and TLS (STARTTLS) as the security. Enter the SMTP login as username and password. Use Odoo's test button: it only connects and signs in, without sending a message. A successful test proves the details are right.
Step 3: pin down the sender
By default Odoo sends in the name of the user performing the action, and that address may be on a different domain than your sending domain. So set a fixed sender address on the mail server or in the system parameters, and let Odoo use the user's address as the reply address. That keeps SPF and DKIM valid while a reply still reaches the right colleague.
Step 4: test with a real message
Send a quote or invoice to a test address outside your domain. Check in Odoo's mail queue whether the message is marked as sent, and then in the delivery log of the dashboard whether the receiving server accepted it. If the message stays stuck in the queue, the fault is on Odoo's side; if it is in our log with a rejection, the rejection reason tells you what is wrong.
Common mistakes
- Test succeeds, but messages stay in the queue — the scheduled job that processes the queue is not running. That is a setting of your Odoo hosting.
- Sender rejected — a user sends from an address outside your sending domain; see step 3.
- Old server still picks up messages — a second outgoing server with a higher priority still exists. Remove it or lower it.
Everything about this integration is on SMTP for Odoo; why a fixed sender matters is explained on SPF, DKIM and DMARC.
Still stuck?
Send us the error from Odoo's mail queue via contact. It usually quotes word for word what our relay answered.
Does it behave differently than described above, or are you stuck anyway? Get in touch with your domain name or customer number at hand and we will take a look with you.
Contact support