Step‑by‑Step Guide to Configure Email Servers in Odoo 16
Step‑by‑Step Guide to Configure Email Servers in Odoo 16
Many businesses rely on Odoo for sales, support, and internal notifications, yet the system will not send or receive messages until the email servers are correctly set up. This tutorial walks you through configuring both outgoing (SMTP) and incoming (IMAP/POP) mail servers, testing the connection, and assigning a default email address for your company. Follow the numbered steps, and you’ll have a fully functional mail flow inside Odoo in no time.
Prerequisites
- An active Odoo 16 instance (self‑hosted or SaaS).
- Credentials for an SMTP service (e.g., Gmail, Outlook, SendGrid) and, if you need inbound mail, IMAP/POP credentials.
- Administrator access to Odoo (user with Settings > Technical > Administrator rights).
- Port 25, 465, or 587 (SMTP) and port 143/993 (IMAP) open on your firewall. If you are hosting Odoo on a virtual private server, you can rely on Cloud VPS to provide a clean, secure environment with the necessary ports pre‑opened.
Configuring the Outgoing Mail Server (SMTP)
Navigate to the Outgoing Mail Settings
- Log in to Odoo as an administrator.
- Go to Settings → General Settings.
- Scroll down to the Discuss & Email section and click Outgoing Mail Servers. This opens the list view of existing SMTP configurations.
Create a New SMTP Server
- Click the Create button.
- Fill in the fields exactly as they appear in your email provider’s documentation:
- SMTP Server: e.g.,
smtp.gmail.com - SMTP Port:
587(STARTTLS) or465(SSL/TLS) - Connection Security: choose STARTTLS or SSL/TLS according to the port.
- Username: full email address (e.g.,
sales@yourcompany.com) - Password: the account password or an app‑specific password if two‑factor authentication is enabled.
- SMTP Server: e.g.,
- Check the box Use TLS (SSL) for authentication if you selected an SSL/TLS port.
- Optionally set a Name for the server (e.g., “Gmail – Sales”).
- Click Test Connection. Odoo will attempt to log in and report success or an error message.
- If the test succeeds, click Save. If it fails, verify the credentials, port, and firewall rules, then retry.
Set the Default Outgoing Server
- Return to the list of outgoing servers.
- Select the newly created server and click Set as Default. Odoo will use this server for all outbound emails unless a specific document overrides it.
Configuring the Incoming Mail Server (IMAP/POP)
Navigate to Incoming Mail Settings
- From the same General Settings page, locate the Incoming Mail Servers link under the Discuss & Email section and click it.
Add a New Incoming Server
- Click Create.
- Enter the following fields:
- Server Type: choose IMAP (recommended) or POP.
- Server: e.g.,
imap.gmail.com - Port:
993for IMAP over SSL,143for STARTTLS. - SSL/TLS: select SSL/TLS if you used port 993.
- Username: full email address used for inbound mail.
- Password: the account password or app‑specific password.
- In the Actions tab, define what Odoo should do with incoming messages:
- Create a new Lead/Opportunity – useful for sales inboxes.
- Create a new Ticket – for help‑desk.
- Leave it blank if you only need to fetch emails for notifications.
- Click Test & Confirm. Odoo will fetch a few recent messages to verify the connection.
- When the test passes, click Save.
Link the Incoming Server to a Specific Alias
- Go to Settings → Technical** → **Email** → **Aliases**.
- Find the alias you want to use (e.g.,
support@yourcompany.com) or create a new one. - Set the Incoming Mail Server field to the server you just created.
- Save the alias. Incoming messages sent to that address will now be processed according to the actions you defined.
Testing the Complete Email Flow
Send a Test Email from Odoo
- Open any record that can send email, such as a Sales Order or a Support Ticket.
- Click the Send by Email button.
- In the compose window, address the email to an external address you control (e.g., your personal Gmail).
- Click Send. Verify that the recipient receives the message and that the subject line includes the Odoo reference (e.g., “SO00123 – Confirmation”).
Verify Inbound Processing
- From your external email account, reply to the test message or send a new email to the alias you configured (e.g.,
support@yourcompany.com). - Wait a few minutes – Odoo’s mail fetcher runs every 5 minutes by default.
- Log back into Odoo and navigate to the module where you set the alias action (e.g., Helpdesk → Tickets). You should see a new ticket created from the inbound email.
- If nothing appears, go to Settings → Technical** → **Email** → **Mail Servers** and check the Log Messages** tab for error details.
Fine‑Tuning and Best Practices
- Use App‑Specific Passwords for providers that enforce two‑factor authentication. This avoids storing your main password in Odoo.
- Limit Outgoing Rate by setting a maximum number of emails per hour in Settings** → **Technical** → **Email** → **Outgoing Mail Servers** → Limit field. This prevents your domain from being flagged as spam.
- Enable DKIM/SPF records on your domain’s DNS to improve deliverability. Odoo itself does not manage these records, but they are essential for professional communications.
- Monitor Logs regularly via Settings** → **Technical** → **Email** → **Emails**. Look for “bounced” or “rejected” statuses and adjust your server settings accordingly.
Conclusion
Proper email integration turns Odoo from a powerful ERP into a complete communication hub. By following the steps above—setting up a reliable outgoing SMTP server, configuring an incoming IMAP/POP server, linking aliases, and testing the flow—you ensure that sales confirmations, support tickets, and internal alerts reach the right people without manual intervention. With a correctly configured mail system, your team can focus on business outcomes rather than troubleshooting email delivery.