Properly configuring the SMTP server in Odoo is essential for smooth communication with customers and business partners, as well as for automating email sending. In this guide, we will show you step by step how to configure SMTP for sending emails in Odoo.
Why is SMTP configuration important in Odoo?
Odoo uses an SMTP server to send various types of emails, including:
- Order and invoice confirmations
- User notifications
- Marketing campaigns
- Automated reminders
- Messages related to project management
Without properly configured SMTP, your Odoo system will not be able to send any emails, which will significantly limit its functionality.
Prerequisites
Before you start configuring SMTP, make sure that:
- You have administrator access to Odoo
- You have the SMTP server credentials (address, port, login, password or app password)
- You know the type of encryption used by your SMTP server
- The developer mode in Odoo is enabled - it is required to access the mail server settings
How to configure SMTP for sending emails - Step-by-step guide
Step 1: Go to the outgoing mail server settings
Log in to your Odoo system as an administrator. Make sure developer mode is enabled. In the main menu, go to Settings, then click Technical in the top menu and select Email > Outgoing Mail Servers. Without developer mode, the Technical menu will not be visible.
Step 2: Create a new SMTP server
Click the Create or New button to add a new SMTP server. A configuration form will open, which you need to fill in with the appropriate details.
Step 3: Enter the basic server details
In the configuration form, enter the following information:
- Description: Give the server a descriptive name, e.g. "Gmail SMTP" or "Company mail server"
- SMTP Server: The mail server address, e.g. smtp.gmail.com
- SMTP Port: Usually 587 for TLS or 465 for SSL
- Username: Your full email address
- Password: Your email account password or app password
Step 4: Configure security settings
Configure the appropriate connection encryption:
- Check the Use TLS option for port 587 (STARTTLS encryption)
- For port 465 (SSL), leave the option unchecked or choose the appropriate method according to your provider's requirements
In the Priority field, enter a number - the lower the value, the higher the priority (e.g. 10 will be used before 20). If you want this server to be used as the default, set the lowest value among all configured servers.
Example configurations for popular providers
Gmail SMTP configuration
For Gmail accounts, the SMTP configuration for sending emails is as follows:
- SMTP Server: smtp.gmail.com
- SMTP Port: 587
- Use TLS: Checked
- Username: your-email@gmail.com
- Password: App password (generated in your Google settings)
Important: Since 2022, Google has disabled the "Less secure app access" option. For Gmail, you must create an app password in your Google account (Google Account > Security > 2-Step Verification > App passwords). 2-Step Verification must be enabled in order to generate an app password. Alternatively, in newer versions of Odoo you can configure OAuth2 authorization for Gmail.
Microsoft 365/Outlook configuration
- SMTP Server: smtp.office365.com
- SMTP Port: 587
- Use TLS: Checked
- Username: your-email@yourcompany.com
- Password: Your Microsoft 365 account password
Note: Microsoft also recommends using OAuth2 for modern applications. If you have authentication problems, check the security settings of your Microsoft 365 account.
Configuration for other providers
Most email providers offer detailed SMTP configuration instructions on their technical support pages. Contact your mail server administrator to get the correct details.
Testing the SMTP configuration
After entering all the details, it is crucial to test the connection. In the SMTP server configuration form, click the Test Connection button, which may be located in the Action menu at the top of the form. Odoo will try to send a test email to the system administrator's address.
If everything is configured correctly, you will see a message confirming that the email was sent successfully. Otherwise, the system will display an error message that will help you identify the problem. Also check your inbox - the test email should arrive within a few minutes.
Common problems and solutions
Authentication error
If you receive an authentication error, check:
- Whether the username and password are correct
- Whether you are using an app password for Gmail (required since 2022) - a regular password will not work
- Whether Microsoft 365 requires OAuth2 instead of a password
- Whether the email account is blocked or requires additional verification
- Whether you have enabled 2-Step Verification in Google (required to generate app passwords)
Connection error
Connection problems may be caused by:
- An incorrect SMTP server address
- A port blocked by a firewall or hosting provider
- An incorrect Use TLS setting - check that it is checked for port 587
- DNS problems - make sure the Odoo server can resolve domain names
Sending limit exceeded
Some email providers have daily sending limits. For free accounts, Gmail limits sending to about 100-500 emails per day (depending on the age and history of the account), and for Google Workspace accounts to about 2,000 emails per day. If you need more, consider using a dedicated SMTP server or a transactional email service such as SendGrid, Mailgun or Amazon SES.
Advanced configuration options
Configuring multiple SMTP servers
Odoo allows you to configure multiple SMTP servers. This can be useful when:
- Different departments use different email addresses
- You want a backup server in case the main one fails
- You need separate servers for different types of emails
The system will use the server with the lowest priority value (the lowest number in the Priority field). If sending fails, Odoo will automatically try the next server on the list, in order of priority.
Filtering by domain or FROM address
In the advanced settings, you can specify:
- FROM Filtering: In this field you can enter an email address or a domain (e.g. sales@company.com or @company.com). The server will be used only for emails sent from the specified address or domain. This way you can configure different SMTP servers for different departments or purposes.
- Email header options in the Advanced section
- Additional SMTP parameters, if required by the provider
Incoming mail configuration
In addition to configuring SMTP for sending emails, it is also worth configuring an incoming mail server (IMAP/POP3) so that Odoo can receive emails. You can find this option in Settings > Technical > Email > Incoming Mail Servers.
Note for Gmail users: Before configuring incoming mail, you must enable IMAP in your Gmail account settings (Settings > See all settings > Forwarding and POP/IMAP > Enable IMAP).
Security best practices
When configuring SMTP, keep security in mind:
- Always use TLS encryption - check the Use TLS option for port 587
- For Gmail accounts and other public services, always use app passwords or OAuth2 instead of your main password
- Change access passwords and app passwords regularly
- Restrict access to developer mode and SMTP settings to administrators only
- Monitor email sending logs for suspicious activity
- Consider using a dedicated email address for sending from Odoo instead of personal accounts
Monitoring and diagnostics
After configuring SMTP, it is worth monitoring the mail system regularly. In developer mode, you can check detailed sending logs by going to Settings > Technical > Email > Emails.
Here you will see all sent and pending emails, their status (sent, outgoing, failed), their content, and any error messages. This is an extremely helpful diagnostic tool when troubleshooting sending problems. You can also manually retry emails that failed once you have fixed the configuration problem.
FAQ - Frequently asked questions
Can I use a free Gmail account to send emails from Odoo?
Yes, you can use a free Gmail account to configure SMTP in Odoo, but keep in mind the limit of about 100-500 emails per day (depending on the age and reputation of the account). You must also configure an app password, because Google disabled the "Less secure app access" option in 2022. For larger companies, we recommend using Google Workspace accounts (limit of ~2,000/day) or dedicated SMTP servers/transactional email services, which offer higher limits and better deliverability.
Why do I get the error "SMTP AUTH extension not supported by server"?
This error usually means that you are trying to connect to the SMTP server using the wrong port or encryption type. Check that you are using the correct port (587 for TLS or 465 for SSL) and that the Use TLS option is set appropriately (it should be checked for port 587). Also make sure that your SMTP server requires and supports authentication. In some cases it may also mean that the SMTP server is unavailable or that the server address is incorrect.
How do I configure different email addresses for different users in Odoo?
You can configure multiple SMTP servers and use the FROM Filtering field to specify which server should be used for a given email address or domain. In the user settings (Settings > Users & Companies > Users) you can also specify the email address assigned to the user. Odoo will automatically match the appropriate SMTP server based on the FROM filter. Alternatively, you can use email aliases configured at your mail provider level, which lets you send from different addresses using the same SMTP server.
Summary
Configuring SMTP for sending emails in Odoo is a simple process that significantly increases the functionality of the system. A properly configured mail server makes it possible to automate communication with customers, send documents and manage notifications efficiently.
Remember that accessing the mail server settings requires developer mode to be enabled, and modern email accounts (Gmail, Microsoft 365) require the use of app passwords or OAuth2 instead of regular passwords. Regular testing and monitoring of the mail system, together with security best practices, will ensure reliable email communication in your organization.
Need help configuring SMTP or other aspects of your Odoo system? The KK Innovations team specializes in Odoo implementations and optimization. Contact us to get professional technical support and consulting tailored to your company's needs. We will help you make full use of the potential of your Odoo system!