Common emailing issues and solutions¶
This page lists the most common emailing issues and their solutions.
Odoo is not an email provider¶
Odoo does not function like a classic email inbox, such as Gmail, Outlook, Yahoo, etc.
While Odoo uses emails as a way to notify and communicate with users/customers, it is, by design, not a replacement for a dedicated email server. Therefore, it might not behave in the expected way when compared to a traditional email inbox.
The main differences are the following:
By default, once a notification or transactional email (quote, invoice, direct message to a contact) is sent out successfully, the email object is deleted. The email message’s content lives in the chatter of the related record. It prevents cluttering the database with multiple copies of the content of the same email (when sent to multiple recipients) if the content is already present in the chatter.
There is no concept of (blind) carbon copy ([B]CC). Odoo uses the concept of followers added to a chatter to automatically decide when and how a contact is notified or receives a copy of an email.
Incoming emails are handled by checking if the TO email address is a valid email address in the Odoo database or, in case of a reply email, if there is a reference in the email header that matches a message sent from the Odoo database. All other emails will be bounced and not temporarily parked in a spam or quarantine folder. In other words, any email unrelated to an Odoo database is lost.
发件邮件¶
Changing the email address of the admin user account¶
When an Odoo database is created, the main admin account is assigned a placeholder email address. It is recommended to replace the admin email address with a valid email address to prevent outgoing email issues.
To do so, on the admin account, click the user icon, click My Profile (or
Preferences), and update the Email field found under the
Preferences tab. Either use any other email address or use your Odoo subdomain (e.g.,
company-name.odoo.com
) and admin
for the local-part (e.g., admin@company-name.odoo.com
).
投递失败¶
When a message is sent, an (envelope) icon is displayed in the chatter. The icon turns red when delivery has failed for at least one recipient.
Left-click the envelope to display information about the delivery, and, if possible, the relevant error messages.
Click See Error Details to get extra information for the fail reason, if Odoo was able to process the original error or bounce email.
Click Send & close to retry sending the email to all toggled-on () recipients under the Try Again column. All toggled-off () recipients will be ignored.
Click Ignore all to ignore all currently failing emails and turn the envelope icon from red to white.
Unsent emails also appear in the Odoo email queue. To access it, activate the developer mode and go to .
Failed emails display the Delivery Failed status. Click Retry to put a failed email in the email queue again. It will then appear with the Outgoing status. The email will be sent again the next time the scheduled action for the email queue runs.
Optionally, queued emails can be sent immediately by clicking Send Now. Click Cancel Email to remove it from the email queue.
注解
Sent emails are periodically cleaned from the queue. This is controlled by the Auto-Vacuum scheduled action that cleans redundant data on your Odoo database.
常见错误信息¶
Daily limit reached¶
Odoo limits the number of emails that can be sent from an Odoo Online database. Most email service providers (e.g., Google, Yahoo, etc.) will blacklist Odoo’s server IP if Odoo’s email server is sending too many emails to addresses that do not exist or are no longer valid. It also applies to unsolicited spam emails sent through an Odoo database.
The default daily email limit varies between 5 and 200 emails. The exact limit is depends on several factors (subject to change):
Type of database subscription (one app free, trial, paying subscription)
Apps installed (i.e., Email Marketing, Marketing Automation)
If a database migration is ongoing
If the daily limit is reached, you can:
Contact Odoo Support to increase your email quota. The following factors will be taken into account:
Numbers of users on the database
Apps installed
Bounce rate (the percentage of email addresses that did not receive emails because they were returned by an email server on their way to the final recipient).
Whether your email aliases are correctly set up and use the appropriate custom domains.
小技巧
When using a custom domain, verify that SPF, DKIM, and DMARC are correctly configured so that Odoo’s email servers are allowed to send emails on your custom domain’s behalf.
Use an external outgoing email server to be independent of Odoo’s email limit.
Wait until the next day, and retry sending the email. To do so, activate the developer mode, go to , and click Retry next to the unsent email.
重要
The daily email limit counts every email leaving your Odoo database, triggered either manually or automatically. By default, any internal message, notification, logged note, etc., counts as an email if it notifies someone via email. This can be mitigated by receiving notifications in Odoo instead of by email.
SMTP 错误¶
Simple Mail Transport Protocol (SMTP) is a standard used to transmit emails between email servers and/or email clients.
If you use an external STMP server to send emails, a standard set of SMTP error codes exists. While the code numbers are not specific to Odoo, the exact content of the error message might vary from email server to email server.
Example
A 550 SMTP permanent delivery error from sendgrid.com:
Mail Delivery Failed
Mail delivery failed via SMTP server 'None'.
SMTPDataError: 550
The from address does not match a verified Sender Identity. Mail cannot be sent until this
error is resolved. Visit https://sendgrid.com/docs/for-developers/sending-email/sender-identity/
to see the Sender Identity requirements
The error message indicates that you tried sending an email from an unverified email address. Investigating the outgoing email server configuration or the default FROM address of your database is a good starting point to troubleshoot the issue, and verify that you whitelisted the email address on the side of sendgrid.com.
Usually, inputting the error message content in a Google search can yield information on what the root cause might be and how to correct the issue.
If the issue cannot be resolved and keeps occurring, contact Odoo Support.
No error populated¶
Odoo is not always capable of providing information on the reason a delivery failed. The different email providers implement their own policy on bounced emails, and it is not always possible for Odoo to interpret it correctly.
If there is a recurring problem with the same customer or the same domain, contact Odoo Support.
注解
One of the most common reasons for an email failing to be sent with no error message is related to the SPF or DKIM configuration. Also, verify that the implemented email notification setup is adapted to your business needs. See the Communication in Odoo by email documentation for more information.
Execution time¶
The exact time of an email is sent is handled by a system utility cron (scheduled action) that can be used to schedule tasks to run automatically at predetermined intervals. Odoo uses this approach to send emails that are considered “not urgent” (i.e., newsletters formats such as mass mailing, marketing automation, and events). This avoids cluttering the mail servers and, instead, prioritizes individual communication.
A cron is an action that Odoo runs in the background to execute particular code to complete a task. Odoo also creates cron triggers in certain workflows that can trigger a scheduled action earlier than its scheduled date. Running a scheduled action manually or changing its frequency is generally not recommended, as it might create errors or break specific workflows.
By default, for the normal email queue, the Mail: Email Queue Manager cron runs every 60 minutes. The lowest running interval for a cron is 5 minutes. Odoo recommends an interval of 15 minutes to ensure proper operation. If the interval is too short, not all emails may be processed, which may cause the cron to timeout.
Emails that are considered urgent (from one person to another, such as sales orders, invoices, purchase orders, etc.) are sent immediately. They do not show up under
, unless their delivery fails.Email campaigns are sent as soon as possible (after clicking the Send button) or at a scheduled time (after clicking the Schedule button).
For the email marketing queue, the Mail Marketing: Process queue cron runs once a day, but will be automatically triggered early if a campaign is scheduled outside of this default frequency. If a mailing list contains a large number of recipients, triggering the cron manually multiple times is not recommended, as it will not accelerate the processing time and might create errors.
小技巧
To edit crons, enable the developer mode and go to .
另请参阅
For more information about crons when using Odoo.sh, check out Odoo.sh frequent technical questions.
Email Marketing campaigns stuck in the queue¶
If multiple Email Marketing campaigns are put in the queue, they are processed in chronological order based on their creation date.
Example
If there are three campaigns: Campaign_1 (created 1st of January), Campaign_2 (created 2nd of January), and Campaign_3 (created 3rd of January), they are put in the queue by clicking Send on all three of them.
The cron will try to process Campaign_1, then Campaign_2, and finally Campaign_3. It will not start processing Campaign_2 until it finishes processing Campaign_1.
If an email campaign never leaves the queue, there might be an issue with the campaign at the top of the queue. To troubleshoot, we could remove Campaign_1 from the queue by clicking the Cancel button, and see if the two other campaigns are sent. Then we could try to fix Campaign_1 or contact Odoo Support.
收件箱邮件¶
When there is an issue with incoming emails, there might not be an indication, per se, in Odoo. It is the sending email client, who tries to contact a database, that will get a bounce message (most of the time a 550: mailbox unavailable error message).
无法接收邮件¶
Contact Odoo Support if there is a recurring issue with the same client or domain.
You can use database logs to understand and fix issues. Logs are a stored collection of all the tasks completed in a database. They are a text-only representation, complete with timestamps of every action taken on the Odoo database. This can be helpful to track emails leaving the database. Sending failures can also be seen by logs when they indicate that the message tried to send repeatedly. Logs show every action to the email servers from the database.
Live logs are located in the ~/logs/
folder (accessed by the command line or on the
Odoo.sh dashboard). Log files are created everyday at 5:00 AM (UTC).
小技巧
The two most recent files, for the current day and the previous one, are named
odoo.log
and odoo.log.1
.
Log files for older dates are named using their dates and are compressed. Use the commands grep and zgrep (for the compressed ones) to search through the files.
另请参阅
For more information on logs and how to access them via the Odoo.sh dashboard, refer to the Odoo.sh logs documentation.
For more information on accessing logs via the command line, refer to the developer logging documentation.
Information for Odoo Support¶
Here is a list of helpful information to include when reaching out to Odoo Support:
An export of the full email from the inbox. These are usually in
.eml
or.msg
file formats containing technical information required for an investigation. The exact process to download the file depends on your third-party email provider.另请参阅
When using a local email software (e.g., Thunderbird, Apple Mail, Outlook, etc.) to synchronize emails, it is usually possible to export the local copies of emails as EML/MSG files. Refer to the documentation of the software used for more information.
小技巧
If possible, the EML/MSG file should be based on the original email that was sent and is failing or is causing issues.
For incoming emails: if possible contact the original email sender and request an EML/MSG copy of the original email. Sending a copy of the original email (forwarded) only contains partial information related to the troubleshooting.
For outgoing emails: either provide the EML/MSG of the email or specify what record in the database is affected (e.g., sales order number, contact name, invoice number) and the date/time when the email was sent (e.g., email sent on the 10th January 2024 11:45 AM Central European Time).
An explanation of the exact flow that is being followed to normally receive those emails in Odoo. Try to answer the following questions:
Is this a notification message from a reply being received in Odoo?
Is this a message being sent from the Odoo database?
Is there an incoming email server being used, or is the email being redirected/forwarded through a custom email server or provider?
您能提供一个已正确转发的电子邮件的示例吗?
Have you changed any email-related settings recently? Did it stop working after those changes?
An answer to the following questions:
Is it a generic issue or is it specific to a use case? If specific to a use case, which one?
Is it working as expected? In case the email is sent using Odoo, the bounce email should reach the Odoo database and display the red envelope.