[FIX] mail: 17.0 full rework of mail communication documentation

1/ Revamp of email_servers to be a introduction and allow correct redirection
+ redirection to other pages linked to mailing + ToC of email_communication folder

2/ Splitting inbound and outbound message into subfiles:
2.a/ email_servers_inbound: all documentation related to incoming emails
2.b/ email_servers_outbound: documentartion related to outgoing emails

3/ email_domain (as before) about authentication protocols to set on domains.

4/ faq: complete revamp to better match usual issues about mailings.

Also: removed unused images, adding anchors on other docs.

RST co-authored-by: jorv-odoo, jqu-odoo, xpl-odoo

doc writers:
- email_servers_inbound by qco-odoo
- email_servers_outbound by EMBR
- email_servers by abridbus
- email_domain by jqu-odoo
- faq by jorv-odoo

related documentation task-3875591

closes odoo/documentation#10598

X-original-commit: 606b84fddf
Signed-off-by: Xavier Platteau (xpl) <xpl@odoo.com>
This commit is contained in:
bve-odoo 2024-06-24 11:18:23 +00:00
parent 296b41299b
commit a6a6fcf1e0
50 changed files with 1187 additions and 700 deletions

View File

@ -402,9 +402,9 @@ we are considering the feature if there is enough demand.
In case the domain of your users email addresses use SPF (Sender Policy Framework) or DKIM
(DomainKeys Identified Mail), don't forget to authorize Odoo as a sending host in your domain name
settings to increase the deliverability of your outgoing emails.
The configuration steps are explained in the documentation about :ref:`SPF
<email_communication/spf_compliant>` and :ref:`DKIM <email_communication/dkim_compliant>`.
settings to increase the deliverability of your outgoing emails. The configuration steps are
explained in the documentation about :ref:`SPF <email-domain-spf>` and :ref:`DKIM
<email-domain-dkim>`.
.. Warning::
Forgetting to configure your SPF or DKIM to authorize Odoo as a sending host can lead to the

View File

@ -33,7 +33,6 @@ In you alias config (:file:`/etc/aliases`):
- `Postfix aliases <http://www.postfix.org/aliases.5.html>`_
- `Postfix virtual <http://www.postfix.org/virtual.8.html>`_
For Exim
--------
@ -47,5 +46,5 @@ For Exim
- `Exim <https://www.exim.org/docs.html>`_
.. tip::
If you don't have access/manage your email server, use :ref:`inbound messages
<email_communication/inbound_messages>`.
If you do not have access/manage your email server, use :ref:`incoming mail servers
<email-inbound-custom-domain-incoming-server>`.

View File

@ -199,6 +199,8 @@ Date`, and any other fields it can populate based on the scanned data, such as t
the new entry to open the individual expense form, and make any changes needed. The scanned receipt
appears in the chatter.
.. _expenses/email_expense:
Automatically create new expenses from an email
-----------------------------------------------

View File

@ -152,7 +152,7 @@ Electrónicos)` incoming email server.
.. important::
In order to receive your SII documents, it's necessary to set up your own email server. More
information on how to do this can be found in this documentation:
:doc:`../../general/email_communication/email_servers`
:doc:`../../general/email_communication`
Begin by clicking :guilabel:`Configure DTE Incoming Email`, then click :guilabel:`New` to add a
server and fill in the following fields:

View File

@ -65,8 +65,8 @@ company to edit it.
.. tip::
Activate the :ref:`developer mode <developer-mode>` to set social media accounts and
company-specific email system parameters. See this documentation on
:doc:`../marketing/social_marketing` and :ref:`email_servers/outbound`.
company-specific email parameters. See this documentation on
:doc:`../marketing/social_marketing` and :doc:`email_communication`.
Companies also have a :guilabel:`Parent Company` set on the company form in :ref:`developer mode
<developer-mode>`.
@ -119,7 +119,7 @@ appears.
.. tip::
Activate the :ref:`developer mode <developer-mode>` to set social media accounts and
company-specific email system parameters. See this documentation on
:doc:`../marketing/social_marketing` and :ref:`email_servers/outbound`.
:doc:`../marketing/social_marketing` and :doc:`email_communication`.
Branches also have a :guilabel:`Parent Company` set on the branch form in :ref:`developer mode
<developer-mode>`. Accounting and fiscal localizations for the branch are set on the

View File

@ -1,13 +1,110 @@
:nosearch:
:show-content:
===================
Email communication
===================
==============================
Communication in Odoo by email
==============================
Communication in Odoo related to records such as CRM opportunities, sales orders, invoices, ...
have a discussion thread called **chatter**, often displayed on the right side of the record.
On the chatter, you can send direct emails or Odoo notifications to the followers of a document
(depending on their notification preferences), log internal notes, send WhatsApp messages or SMSes,
and schedule activities.
If a follower replies to a message, the reply updates the chatter, and Odoo relays it to the
followers as a notification. All emails - outgoing and incoming - appear in the same chatter.
.. _email-online-sh:
Odoo Online and Odoo.sh users
=============================
On Odoo Online and Odoo.sh, outgoing and incoming emails work out of the box, **nothing needs to be
done**. Everything is already configured on your subdomain.
By default, outgoing emails use the following :ref:`notification email address
<email-outbound-notifications>` `notifications@company-name.odoo.com`.
.. _email-online-sh-domain:
Using another domain
--------------------
If you prefer not to have outgoing emails sent from Odoo's subdomain `@company-name.odoo.com` but
instead :ref:`from your own domain <email-outbound-custom-domain>`, **additional configuration will
be necessary** on the domain and within Odoo. This introduces an extra layer of complexity and
necessitates technical knowledge (mainly regarding DNS and mail protocols).
By adding a domain and configuring the administration access rights, you can also access the
:ref:`new domain alias <email-outbound-alias-domain>` page to configure the alias of your companies.
If only one domain is configured, this domain will be shared by all companies on the database.
If you want to keep using Odoo's mail server, you will have to :ref:`configure the SPF and DKIM
<email-domain-spf>`.
If :ref:`you want to use your own mail server <email-outbound-custom-domain-smtp-server>`, you will
have to follow the mail server provider's specific documentation.
For incoming emails, after adding your own domain, :ref:`replies from customers will come back to
your domain <email-inbound-custom-domain>`, and you will need to use one of the three possible ways
to get the emails back into Odoo (using either :ref:`incoming mail server
<email-inbound-custom-domain-incoming-server>`, :ref:`redirection/forwarding
<email-inbound-custom-domain-redirections>` or :ref:`DNS MX record
<email-inbound-custom-domain-mx>`). Everything is covered in the :doc:`Manage inbound messages
documentation <email_communication/email_servers_inbound>`.
.. _email-on-premise:
On-premise users
================
If you are on-premise, you will have to completely configure your outgoing and incoming emails:
- For outgoing emails, you will need :ref:`to use an SMTP server and a custom domain
<email-outbound-custom-domain-odoo-server>`.
- For incoming emails, set the frequency at which you fetch new emails low enough for responsiveness
but high enough in order not to stress your system or provider. Due to this reason and the
simplicity of this configuration, we usually advise on using incoming mail servers. To use an SMTP
server, check out the :ref:`"Use a custom domain for inbound messages" documentation
<email-inbound-custom-domain>`.
.. _email-third-party-server:
Using a third-party provider's mail server
==========================================
Odoo's documentation also covers several popular mail servers. As they require specific
authorizations and configuration, they add a layer of complexity. For this reason, using Odoo's
outgoing mail server is recommended.
- :doc:`Outlook documentation <email_communication/azure_oauth>`
- :doc:`Gmail documentation <email_communication/google_oauth>`
- :doc:`Mailjet documentation <email_communication/mailjet_api>`
.. note::
Every provider has its own limitations. Research the desired provider *before* configuring it.
For example, Outlook and Gmail might not be suitable for large marketing campaigns.
.. seealso::
- :doc:`Activities <../essentials/activities>`
- :doc:`Discuss app <../productivity/discuss>`
- :doc:`Digest emails <companies/digest_emails>`
- :doc:`Email Marketing app <../marketing/email_marketing>`
- :doc:`Email templates <companies/email_template>`
- :ref:`Expense creation using an email alias <expenses/email_expense>`
- :ref:`Helpdesk ticket creation using an email alias <helpdesk/receiving_tickets/email-alias>`
- :ref:`Lead creation using an email alias <crm/configure_email_alias>`
- :ref:`Project task creation using an email alias <task_creation/email_alias>`
- :doc:`Technical mail getaway for on-premise users
<../../administration/on_premise/email_gateway>`
- :ref:`Technical start of Odoo database with an outgoing mail server configured from the
command-line interface <reference/cmdline/server/emails>`
.. toctree::
:titlesonly:
email_communication/email_servers
email_communication/email_servers_inbound
email_communication/email_servers_outbound
email_communication/email_domain
email_communication/azure_oauth
email_communication/google_oauth

View File

@ -165,7 +165,7 @@ Then, create a new email server and check the box for :guilabel:`Outlook`. Next,
:guilabel:`Name` (it can be anything) and the Microsoft Outlook email :guilabel:`Username`.
If the :guilabel:`From Filter` field is empty, enter either a :ref:`domain or email address
<email_communication/default>`.
<email-outbound-unique-address>`.
Then, click on :guilabel:`Connect your Outlook account`.
@ -203,7 +203,8 @@ This address must also match the `{mail.default.from}@{mail.catchall.domain}` ke
system parameters.
.. seealso::
For more information on the from filter visit: :ref:`email_communication/default`.
Visit the :ref:`From Filtering documentation <email-outbound-different-servers-personalized-from-filtering>` for more
information.
.. note::
The :guilabel:`System Parameters` can be accessed by activating :ref:`developer-mode` in the
@ -244,7 +245,8 @@ so that only the user's email is sent from that server. In other words, only a u
address that matches the set :guilabel:`FROM Filtering` is able to use this server.
.. seealso::
For more information on the from filter visit: :ref:`email_communication/default`.
Visit the :ref:`From Filtering documentation <email-outbound-different-servers-personalized-from-filtering>` for more
information.
A :ref:`fallback server <azure_oauth/notifications>` must be setup to allow for the sending of
:guilabel:`notifications`. The :guilabel:`FROM Filtering` for this server should have the value of
@ -261,7 +263,7 @@ the `{mail.default.from}@{mail.catchall.domain}`.
.. seealso::
For more information on setting the mass-mailing email server visit
:ref:`email_communication/mass_mails`.
:ref:`email-outbound-custom-domain-smtp-server`.
.. example::
Multiple user outgoing mail server configuration:
@ -288,6 +290,3 @@ new configuration. Check or Select the button next to :guilabel:`Outlook Oauth A
enter the :guilabel:`Microsoft Outlook username`. Click on :guilabel:`Connect your Outlook
account`. Odoo will state: :guilabel:`Outlook Token Valid` Now :guilabel:`Test and Confirm` the
account. The account should be ready to receive email to the Odoo database.
.. seealso::
:doc:`email_servers`

View File

@ -2,204 +2,144 @@
Configure DNS records to send emails in Odoo
============================================
SPAM labels overview
====================
This documentation presents three complementary authentication protocols (SPF, DKIM, and DMARC) used
to prove the legitimacy of an email sender. Not complying with these protocols will greatly reduce
chances of your emails to reach their destination.
Sometimes, emails from Odoo are misclassified by the different email providers and end up in spam
folders. At the moment, some settings are out of Odoo's control, notably the way the different email
providers classify Odoo's emails according to their own restriction policy and/or limitations.
**Odoo Online** and **Odoo.sh** databases using the **default Odoo subdomain address** (e.g.,
`\@company-name.odoo.com`) are pre-configured to **send authenticated emails** compliant with the
SPF, DKIM, and DMARC protocols.
It is standard in Odoo that emails are received from ``"name of the author"
<notifications@mycompany.odoo.com>``. In other words this can be translated to: ``"name of the
author" <{ICP.mail.from.filter}@{mail.catchall.domain}>``. In this case ICP stands for
`ir.config_parameter`, which are the System Parameters. Deliverability is greatly improved with the
:ref:`notifications configuration <email_servers/notifications>`.
If choosing to use a **custom domain** instead, **configuring SPF and DKIM records correctly is
essential** to prevent emails from being quarantined as spam or not being delivered to recipients.
In order for servers to accept emails from Odoo on a more regular basis, one of the solutions is
for customers to create rules within their own mailbox. A filter can be added to the email inbox so
that when email is received from Odoo (`notifications@mycompany.odoo.com`) it is moved to the
inbox. It is also possible to add the Odoo database domain onto a safe senders list or whitelist
on the receiving domain.
If an Odoo email server appears on a blacklist, notify Odoo via a `new help ticket
<https://www.odoo.com/help>`_ and the support team will work to get the servers removed from the
blacklist.
Should the Odoo database be using a custom domain for sending emails from Odoo there are three
records that should be implemented on the custom domain's DNS to ensure deliverability of email.
This includes setting records for :abbr:`SPF (Sender Policy Framework)`,
:abbr:`DKIM (DomainKeys Identified Mail)` and
:abbr:`DMARC (Domain-based Message Authentication, Reporting, & Conformance)`. Ultimately though,
it is up to the discretion of the final receiving mailbox.
.. _email_communication/spf_compliant:
Be SPF compliant
================
The Sender Policy Framework (SPF) protocol allows the owner of a domain name to specify which
servers are allowed to send emails from that domain. When a server receives an incoming email,
it checks whether the IP address of the sending server is on the list of allowed IPs according to
the sender's :abbr:`SPF (Sender Policy Framework)` record.
If using :ref:`the default Odoo email server to send emails from a custom domain
<email-outbound-custom-domain-odoo-server>`, the SPF and DKIM records must be configured as
presented below. If using an outgoing email server, it is required to use the SPF and DKIM records
specific to that email service and a custom domain.
.. note::
The :abbr:`SPF (Sender Policy Framework)` verification is performed on the domain mentioned in
the `Return-Path` field of the email. In the case of an email sent by Odoo, this domain
corresponds to the value of the `mail.catchall.domain` key in the database system parameters.
Email service providers apply different rules to incoming emails. An email may be classified as
spam even if it passes the SPF and DKIM checks.
The :abbr:`SPF (Sender Policy Framework)` policy of a domain is set using a TXT record. The way to
create or modify a TXT record depends on the provider hosting the :abbr:`DNS (Domain Name System)`
zone of the domain name. In order for the verification to work properly, each domain can only have
one :abbr:`SPF (Sender Policy Framework)` record.
.. _email-domain-spf:
If the domain name does not yet have a :abbr:`SPF (Sender Policy Framework)` record, create one
using the following input: `v=spf1 include:_spf.odoo.com ~all`
SPF (Sender Policy Framework)
=============================
If the domain name already has a :abbr:`SPF (Sender Policy Framework)` record, the record must be
updated (and do not create a new one).
The Sender Policy Framework (SPF) protocol allows the owner of a domain name to specify which
servers are allowed to send emails from that domain. When a server receives an incoming email, it
checks whether the IP address of the sending server is on the list of allowed IPs according to the
sender's :abbr:`SPF (Sender Policy Framework)` record.
In Odoo, the **SPF test is performed on the bounce address** defined under the :guilabel:`Alias
Domain` field found under the database's :guilabel:`General Settings`. If using a custom domain as
:guilabel:`Alias Domain`, it is necessary to configure it to be SPF-compliant.
The SPF policy of a domain is set using a TXT record. The way to create or modify this record
depends on the provider hosting the :abbr:`DNS (Domain Name System)` zone of the domain name.
If the domain name does not yet have an SPF record, create one using the following input:
.. code-block:: bash
v=spf1 include:_spf.odoo.com ~all
If the domain name **already has an SPF record, the record must be updated**. Do not create a new
one, as a domain must have only one SPF record.
.. example::
If the TXT record is `v=spf1 include:_spf.google.com ~all`, edit it to add
`include:_spf.odoo.com`: `v=spf1 include:_spf.odoo.com include:_spf.google.com ~all`
Check if the :abbr:`SPF (Sender Policy Framework)` record is valid with a free tool like `MXToolbox
SPF <https://mxtoolbox.com/spf.aspx>`_.
Check the SPF record using a tool like `MXToolbox SPF Record Check
<https://mxtoolbox.com/spf.aspx>`_. The process to create or modify an SPF record depends on the
provider hosting the DNS zone of the domain name. The :ref:`most common providers
<email-domain-providers-documentation>` and their documentation are listed below.
.. _email_communication/DKIM_compliant:
.. _email-domain-dkim:
Enable DKIM
===========
DKIM (DomainKeys Identified Mail)
=================================
The DomainKeys Identified Mail (DKIM) allows a user to authenticate emails with a digital
signature.
The DomainKeys Identified Mail (DKIM) allows a user to authenticate emails with a digital signature.
When sending an email, the Odoo server includes a unique :abbr:`DKIM (DomainKeys Identified Mail)`
signature in the headers. The recipient's server decrypts this signature using the :abbr:`DKIM
(DomainKeys Identified Mail)` record in the database's domain name. If the signature and the key
contained in the record match, this guarantees that the message is authentic and has not been
altered during transport.
When sending an email, the Odoo email server includes a unique :abbr:`DKIM (DomainKeys Identified
Mail)` signature in the headers. The recipient's server decrypts this signature using the DKIM
record in the database's domain name. If the signature and the key contained in the record match, it
proves the message is authentic and has not been altered during transport.
To enable :abbr:`DKIM (DomainKeys Identified Mail)`, add a :abbr:`CNAME (Canonical Name)` record to
the :abbr:`DNS (Domain Name System)` zone of the domain name:
Enabling DKIM is **required** when sending emails **from a custom domain** using the Odoo email
server.
`odoo._domainkey IN CNAME odoo._domainkey.odoo.com.`
To enable DKIM, add a :abbr:`CNAME (Canonical Name)` record to the :abbr:`DNS (Domain Name System)`
zone of the domain name:
.. code-block:: bash
odoo._domainkey IN CNAME odoo._domainkey.odoo.com.
.. tip::
If the domain name is `mycompany.com`, make sure to create a subdomain
`odoo._domainkey.mycompany.com` whose canonical name is `odoo._domainkey.odoo.com.`.
If the domain name is `company-name.com`, make sure to create a subdomain
`odoo._domainkey.company-name.com` whose canonical name is `odoo._domainkey.odoo.com.`.
The way to create or modify a :abbr:`CNAME (Canonical Name)` record depends on the provider hosting
the :abbr:`DNS (Domain Name System)` zone of the domain name. The most common providers are
:ref:`listed below <email_communication/SPFDKIM_common_providers>`.
The way to create or modify a CNAME record depends on the provider hosting the DNS zone of the
domain name. The :ref:`most common providers <email-domain-providers-documentation>` and their
documentation are listed below.
Check if the :abbr:`DKIM (DomainKeys Identified Mail)` record is valid with a free tool like `DKIM
Core <https://dkimcore.org/tools/>`_. If a selector is asked, enter `odoo`.
Check if the DKIM record is valid using a tool like `MXToolbox DKIM Record Lookup
<https://mxtoolbox.com/dkim.aspx>`_. Enter `example.com:odoo` in the DKIM lookup tool, specifying
that the selector being tested is `odoo` for the custom domain `example.com`.
.. _email_communication/DMARC_compliant:
.. _email-domain-dmarc:
Check the DMARC policy
======================
DMARC (Domain-based Message Authentication, Reporting and Conformance)
======================================================================
The Domain-based Message Authentication, Reporting, & Conformance (DMARC) record is a protocol that
unifies :abbr:`SPF (Sender Policy Framework)` and :abbr:`DKIM (DomainKeys Identified Mail)`. The
instructions contained in the :abbr:`DMARC (Domain-based Message Authentication, Reporting, &
Conformance)` record of a domain name tell the destination server what to do with an incoming email
that fails the :abbr:`SPF (Sender Policy Framework)` and/or :abbr:`DKIM (DomainKeys Identified
Mail)` check.
The :abbr:`DMARC (Domain-based Message Authentication, Reporting, & Conformance)` record is a
protocol that unifies :abbr:`SPF (Sender Policy Framework)` and :abbr:`DKIM (DomainKeys Identified
Mail)`. The instructions contained in the DMARC record of a domain name tell the destination server
what to do with an incoming email that fails the SPF and/or DKIM check.
.. example::
DMARC: TXT record
.. note::
The aim of this documentation is to help **understand the impact DMARC has on the deliverability
of emails**, rather than give precise instructions for creating a DMARC record. Refer to a
resource like `DMARC.org <https://dmarc.org/>`_ to set the DMARC record.
`v=DMARC1; p=none;`
There are three :abbr:`DMARC (Domain-based Message Authentication, Reporting, & Conformance)`
policies:
There are three DMARC policies:
- `p=none`
- `p=quarantine`
- `p=reject`
`p=quarantine` and `p=reject` instruct the server that receives an email to quarantine that email or
ignore it if the :abbr:`SPF (Sender Policy Framework)` and/or :abbr:`DKIM (DomainKeys Identified
Mail)` check fails.
ignore it if the SPF or DKIM check fails.
If the domain name uses :abbr:`DMARC (Domain-based Message Authentication, Reporting, &
Conformance)` and has defined one of these policies, the domain must be :abbr:`SPF (Sender Policy
Framework)` compliant or enable :abbr:`DKIM (DomainKeys Identified Mail)`.
.. note::
**For the DMARC to pass, the DKIM or SPF check needs to pass** and the domains must be in
alignment. If the hosting type is Odoo Online, DKIM configuration on the sending domain is
required to pass the DMARC.
.. warning::
Yahoo or AOL are examples of email providers with a :abbr:`DMARC (Domain-based Message
Authentication, Reporting, & Conformance)` policy set to `p=reject`. Odoo strongly advises
against using an *@yahoo.com* or *@aol.com* address for the database users. These emails will
never reach their recipient.
Passing DMARC generally means that the email will be successfully delivered. However, it's important
to note that **other factors like spam filters can still reject or quarantine a message**.
`p=none` is used for the domain owner to receive reports about entities using their domain. It
should not impact the deliverability if the :abbr:`DMARC (Domain-based Message Authentication,
Reporting, & Conformance)` check fails.
should not impact the deliverability.
:abbr:`DMARC (Domain-based Message Authentication, Reporting, & Conformance)` records are comprised
of tags in the form of :abbr:`DNS (Domain Name System)` records. These tags/parameters allow for
reporting, such as :abbr:`RUA (Reporting URI of aggregate reports)` and :abbr:`RUF (Reporting URI
for forensic reports)`, along with more precise specification like :abbr:`PCT (Percentage of
messages subjected to filtering)`, :abbr:`P (Policy for organizational domain)`, :abbr:`SP (Policy
for subdomains of the OD)` :abbr:`ADKIM (Alignment mode for DKIM)` & :abbr:`ASPF (Alignment mode for
SPF)`. For best practice, the the :abbr:`DMARC (Domain-based Message Authentication, Reporting, &
Conformance)` policy should not start out being too restrictive.
.. example::
:literal:`_dmarc IN TXT “v=DMARC1; p=none; rua=mailto:postmaster@example.com”` means that
aggregate DMARC reports will be sent to `postmaster\@example.com`.
The following chart displays available tags:
.. _email_domain/mail_config_common_providers:
.. _email-domain-providers-documentation:
.. list-table::
:header-rows: 1
:widths: 15 50 35
* - Tag Name
- Purpose
- Example
* - v
- Protocol version
- `v=DMARC1`
* - pct
- Percentage of messages subjected to filtering
- `pct=20`
* - ruf
- Reporting URI for forensic reports
- `ruf=mailto:authfail@example.com`
* - rua
- Reporting URI of aggregate reports
- `rua=mailto:aggrep@example.com`
* - p
- Policy for organizational domain
- `p=quarantine`
* - sp
- Policy for subdomains of the OD
- `sp=reject`
* - adkim
- Alignment mode for DKIM
- `adkim=s`
* - aspf
- Alignment mode for SPF
- `aspf=r`
Check the :abbr:`DMARC (Domain-based Message Authentication, Reporting, & Conformance)` record of a
domain name with a tool like `MXToolbox DMARC <https://mxtoolbox.com/DMARC.aspx>`_.
.. seealso::
`DMARC.org is another great resource to learn about DMARC records.
<https://dmarc.org/overview/>`_
.. _email_communication/SPFDKIM_common_providers:
SPF, DKIM & DMARC documentation of common providers
===================================================
SPF, DKIM and DMARC documentation of common providers
=====================================================
- `OVH DNS <https://docs.ovh.com/us/en/domains/web_hosting_how_to_edit_my_dns_zone/>`_
- `OVH SPF <https://docs.ovh.com/us/en/domains/web_hosting_the_spf_record/>`_
- `GoDaddy TXT record <https://www.godaddy.com/help/add-a-txt-record-19232>`_
- `GoDaddy SPF <https://www.godaddy.com/help/add-an-spf-record-19218>`_
- `GoDaddy DKIM <https://www.godaddy.com/help/add-a-cname-record-19236>`_
- `NameCheap <https://www.namecheap.com/support/knowledgebase/article.aspx/317/2237/how-do-i-add-
txtspfdkimdmarc-records-for-my-domain/>`_
- `GoDaddy CNAME record <https://www.godaddy.com/help/add-a-cname-record-19236>`_
- `NameCheap <https://www.namecheap.com/support/knowledgebase/article.aspx/317/2237/how-do-i-add-txtspfdkimdmarc-records-for-my-domain/>`_
- `CloudFlare DNS <https://support.cloudflare.com/hc/en-us/articles/360019093151>`_
- `Google Domains <https://support.google.com/domains/answer/3290350?hl=en>`_
- `Azure DNS <https://docs.microsoft.com/en-us/azure/dns/dns-getstarted-portal>`_

View File

@ -1,345 +0,0 @@
.. _communication/emails_servers:
====================================================
Send and receive emails in Odoo with an email server
====================================================
Odoo Online or Odoo.sh users
============================
Since **Odoo sets up its own mail servers for the database**, outgoing and incoming emails already
work out-of-the-box. So for **Odoo Online** and **Odoo.sh** customers, nothing needs to be
configured!
Unless an external mail server is required to send large batches of mass emails, simply use the
standard online Odoo database normally since it has already been pre-configured to send email.
.. important::
The Odoo server is subject to a daily email limit to prevent abuse. The default limit is 200
emails sent per day for databases with an **Enterprise** subscription. This limit can be
increased under certain conditions. See the :doc:`FAQ <faq>` or contact support for more
information.
Scope of this documentation
===========================
This document is **mainly dedicated to Odoo on-premise databases** that do not benefit from an
out-of-the-box solution to send and receive emails in Odoo, unlike `Odoo Online <https://www.odoo.
com/trial>`_ and `Odoo.sh <https://www.odoo.sh>`_. Incoming and outgoing servers must be configured
for on-premise databases.
The following sections below contain information on how to integrate an external email server with
Odoo.
.. warning::
If no one in the company is employed to manage email servers, Odoo Online and Odoo.sh are
strongly recommended. In these Odoo hosting types email sending and receiving works instantly
and is monitored by professionals. Nevertheless, a company can use their own email server if
they want to manage the email server's reputation themselves. For more information see
:doc:`Configure DNS records to send emails in Odoo <email_domain>`
.. _email_servers/notifications:
Default notifications system
============================
Documents in Odoo (such as a CRM opportunity, a sales order, an invoice, etc.) have a discussion
thread, called *chatter*.
When a database user posts a message in the chatter, this message is sent by email to the followers
of the document as a notification (except to the sender). If a follower replies to the message,
the reply updates the chatter, and Odoo relays another reply to the followers as a notification.
Messages sent back to the chatter from users or external users will appear in the chatter from
their respective email, or as the name listed in their *Contacts* record.
These notifications are sent using a default from address. For more information see
:ref:`Use a default email address <email_communication/default>`.
.. _email_servers/outbound:
Manage outbound messages
========================
As a system administrator, go to :menuselection:`Settings --> General Settings --> Discuss` in Odoo,
and enable the :guilabel:`Custom Email Servers` option. Then, click :guilabel:`Save`. Next, click
:guilabel:`Outgoing Email Servers` and click :guilabel:`Create` to create a new outgoing mail server
record in Odoo. Reference the SMTP data of the external email server. Once all the information has
been filled out, click :guilabel:`Test Connection`.
.. seealso::
- :doc:`google_oauth`
- :doc:`azure_oauth`
.. note::
Ensuring the outgoing domain has :abbr:`SPF (Sender Policy Framework)`, :abbr:`DKIM (DomainKeys
Identified Mail)` and :abbr:`DMARC (Domain-based Message Authentication, Reporting, &
Conformance)` set up on the :abbr:`DNS (Domain Name System)` will improve deliverability. For
more information see :doc:`email_domain`.
.. _email_servers/restriction:
Port restriction
----------------
Note that port 25 is blocked for security reasons on the Odoo Online and Odoo.sh platforms. Try
using ports 465, 587, or 2525 instead.
.. _email_communication/default:
Use a default "From" email address
----------------------------------
Sometimes, an email's "From" (outgoing) address can belong to a different domain, and that can be a
problem.
For example, if a customer with the email address `mary\@customer.example.com` responds to a
message, Odoo will try to redistribute that same email to the other subscribers in the thread.
However, if the domain `customer.example.com` forbids that kind of usage for security, the email
that Odoo is trying to redistribute would get rejected by some recipients' email servers.
To avoid that problem, Odoo sends all emails using a "From" address from the same authorized
domain.
Access the :guilabel:`System Parameters` by activating :ref:`developer mode <developer-mode>` and
going to :menuselection:`Settings --> Technical --> Parameters --> System Parameters` menu.
To force the email address from which emails are sent, a combination of the following keys needs to
be set in the system parameters of the database:
- `mail.default.from`: accepts the local part or a complete email address as value
- `mail.default.from_filter`: accepts a domain name or a full email address as value
.. note::
The `mail.default.from_filter` works only for `odoo-bin` configurations or the default Odoo email
server, otherwise this parameter can be set using the `from_filter` field on `ir.mail_server`.
The field can be a domain name or an entire email address, or it can remain empty. If the sender's
email address does not match this set filter, then the email will be encapsulated using a
combination of the two system parameters: `mail.default.from` and `mail.catchall.domain`.
.. example::
In the following example, the from email address is replaced with the combination of the the two
system parameters (`mail.default.from` and `mail.catchall.domain`). This is the default \
notifications configuration in Odoo: ``“Admin” <admin@example.com>`` => ``“Admin”
<notifications@mycompany.com>``.
In other words if the email address of the author does not match `mail.default.from_filter`, the
email address is replaced by `mail.default.from` (if it contains a full email address) or a
combination of `mail.default.from` and `mail.catchall.domain`.
If the `from_filter` contains a full email address, and if the `mail.default.from` is the same as
this address, then all of the email addresses that are different from `mail.default.from` will be
encapsulated in `mail.default.from`.
.. _email_communication/from_filter:
Utilizing the "From" filter on an outgoing email server
-------------------------------------------------------
The :guilabel:`FROM Filtering` field allows for the use of a specific outgoing email server
depending on the :guilabel:`From` email address or domain that Odoo is sending on behalf of. This
setting can be used to improve the deliverability or sending success rate of emails sent from the
database. Setting the :guilabel:`FROM Filtering` field can also be used to send from different
domains in a multi-company environment. Access this field in Odoo by navigating to
:menuselection:`Settings --> Discuss --> Custom Mail Servers --> Outgoing Mail Servers --> New`.
.. image:: email_servers/from-filter-setting.png
:align: center
:alt: Outgoing email server settings and the FROM filter settings.
When an email is sent from Odoo while the :guilabel:`FROM Filtering` field is set, an email server
is chosen in the following sequence:
#. First, Odoo searches for an email server that has the same :guilabel:`FROM Filtering` value as
the :guilabel:`From` value (email address) defined in the outgoing email. For example, if the
:guilabel:`From` value (email address) is `test\@example.com`, only the email servers that have
the :guilabel:`FROM Filtering` value equal to `test\@example.com` are returned.
#. However, if no email servers are found that use the :guilabel:`From` value, then Odoo searches
for an email server that has the same *domain* as the :guilabel:`From` value (email address)
defined in the outgoing email. For example, if the :guilabel:`From` email address is
`test\@example.com`, only the email servers that have the :guilabel:`FROM Filtering` value equal
to `example.com` are returned.
If no email servers are found after checking for the domain, then Odoo returns all email servers
that do not have any :guilabel:`FROM Filtering` value(s) set.
Should this query return no results, then Odoo performs a search for an email server using the
system parameter: `mail.default.from`. First, the email address listed attempts to match an email
server, and then the domain attempts to find a match. If no email server is found, Odoo returns the
first outgoing email server (sorted by priority).
.. note::
If several email servers are found, then Odoo uses the first one according to its priority. For
example, if there are two email servers, one with a priority of `10` and the other with a
priority of `20`, then the email server with a priority of `10` is used first.
.. _email_communication/mass_mails:
Set up different dedicated servers for transactional and mass emails
--------------------------------------------------------------------
In Odoo a separate email server can be used for transactional emails and mass
mailings. Example: Use Postmark or SendinBlue for transactional emails, and Amazon SES, Mailgun,
Sendgrid or :doc:`Mailjet <mailjet_api>` for mass mailings.
.. important::
A default outgoing email server is already configured. Do not create an alternative one unless a
specific external outgoing email server is needed for technical reasons.
To do this, first activate the :ref:`developer mode <developer-mode>`, and then go to
:menuselection:`Settings --> Technical --> Outgoing` email servers. There, create two outgoing email
server settings; one for the transactional emails and one for the mass mailing server. Make sure to
give priority to the transactional server over the mass mailing server by providing a lower priority
number for the transactional email server.
Now, go to :menuselection:`Email Marketing --> Settings` and enable :guilabel:`Dedicated Server`.
Choose the appropriate email server. With these settings, Odoo uses the server with the lower
priority for transactional emails, and the server here selected for mass mails. Note that in this
case, the domain's Sender Policy Framework (SPF) records must be set to include both transactional
and mass mail servers.
.. seealso::
- :doc:`email_domain`
.. _email_communication/inbound_messages:
Manage inbound messages
=======================
Odoo relies on generic email aliases to fetch incoming messages.
* **Reply messages** of messages sent from Odoo are routed to their original discussion thread (and
to the inbox of all its followers) by the alias of the model if there is any or by the catchall
alias (**catchall@**). Replies to messages of models that do not have a custom alias will use the
catchall alias (`catchall@mycompany.odoo.com`). The catchall address, however, does not have
another action attached to it like other aliases might, it is only used to collect replies.
* **Bounced messages** are used as a Return-Path. One example this is especially
useful for is in `Odoo Email Marketing <https://www.odoo.com/page/email-marketing>`__. In this
case bounces are opt-out based on if the email bounced too many times (5) in the last month and
the bounces are separated by one week. This is done to avoid blacklisting someone because of a
mail server error. If these circumstances are met then the email is considered invalid and is
blacklisted. A log note is added on the contact under :guilabel:`Blacklisted Email Addresses` on
the :guilabel:`Email Marketing Configuration Menu`.
Messages that bounce in the chatter (outside of Email Marketing) will populate a red envelope
indicating the failed delivery. This can be helpful to know that a Sales Order or an Invoice did
not reach its final destination.
* **Original messages**: several business objects have their own alias to create new records in Odoo
from incoming emails:
* Sales channel (to create *Leads* or *Opportunities* in `Odoo CRM <https://www.odoo.com/page/
crm>`_)
* Support channel (to create *Tickets* in `Odoo Helpdesk <https://www.odoo.com/page/helpdesk>`_)
* Projects (to create new *Tasks* in `Odoo Project <https://www.odoo.com/page
/project-management>`_)
* Job positions (to create *Applicants* in `Odoo Recruitment <https://www.odoo.com/page
/recruitment>`_)
Depending on the mail server, there might be several methods to fetch emails. The easiest and most
recommended method is to manage one email address per Odoo alias in the mail server.
* Create the corresponding email addresses in the mail server (**catchall@**, **bounce@**,
**sales@**, etc.).
* Set the :guilabel:`Alias Domain` name in :menuselection:`Settings --> General Settings -->
Discuss`. Changing the :guilabel:`Alias Domain` will change the catchall's domain for the
database.
* If the database's hosting type is Odoo on-premise, create an :guilabel:`Incoming Mail Server` in
Odoo for each alias. To create a new incoming server go to: :menuselection:`Settings --> Discuss
--> Custom Mail Servers --> Incoming Mail Servers --> New` Fill out the form according to the
email provider's settings. Leave the :guilabel:`Actions to Perform on Incoming Mails` field blank.
Once all the information has been filled out, click on :guilabel:`TEST & CONFIRM`.
.. image:: email_servers/incoming-server.png
:align: center
:alt: Incoming mail server configuration on Odoo.
* If the database's hosting type is Odoo Online or Odoo.sh, redirecting or forwarding incoming
messages to Odoo's domain name instead of the external email server is recommended. That way,
incoming messages can be received without delay. Redirections for all email addresses should be
set to Odoo's domain name in the email server (e.g. `catchall\@mydomain.ext` to
`catchall\@mycompany.odoo.com`).
All the aliases are customizable in Odoo. Object aliases can be edited from their respective
configuration view by navigating to :menuselection:`Settings --> Technical Menu --> Email -->
Aliases`.
To edit catchall and bounce aliases, first activate the :ref:`developer mode <developer-mode>`.
Then, go to :menuselection:`Settings --> Technical --> Parameters --> System Parameters` to
customize the aliases (`mail.catchall.alias` & `mail.bounce.alias`). These types of changes should
be completed prior to the database going live. If a customer replies after a change is made then the
system will not recognize the old alias, and the reply will not be received.
By default, inbound messages are fetched every 5 minutes for on-premise databases.
.. note::
This value can be changed in :ref:`developer mode <developer-mode>`. Go to
:menuselection:`Settings --> Technical --> Automation --> Scheduled Actions` and look for
:guilabel:`Mail: Fetchmail Service`.
System parameters that prevent feedback loops
---------------------------------------------
There are two system parameters that help prevent email loops from occurring in Odoo. These
parameters were introduced in Odoo 16 to prevent aliases from creating too many records and to
prevent feedback loops on the catchall reply-to email address. They are present in database but not
in the *System Parameters*. To override the following defaults they need to be added in.
The two system parameters are as follows:
- `mail.gateway.loop.minutes` (120 minutes by default)
- `mail.gateway.loop.threshold` (20 by default)
Add these fields in Odoo by first enabling :ref:`developer mode <developer-mode>`, and then
navigating to :menuselection:`Settings --> Technical Menu --> Parameters --> System Parameters`.
Change the value of these parameters, as needed.
When an email is received in the Odoo database on the catchall email address or on any alias, Odoo
looks at the mail received for the given period of time defined in the system parameter
`mail.gateway.loop.minutes`. If the received email was sent to an alias then Odoo will reference the
`mail.gateway.loop.threshold` system parameter and determine the value as the number of records this
alias is allowed to create in the given period of time (value of `mail.gateway.loop.minutes`).
In addition, when email is received to the catchall email address, Odoo will reference the emails
received to the database during the set period of time (as stated by the value in the system
parameter: `mail.gateway.loop.minutes`). Odoo will then determine whether any of the emails
received match that of the email(s) being received during the specified time-frame, and will prevent
a feedback loop from occurring if a duplicate email is detected.
Allow alias domain system parameter
-----------------------------------
Incoming aliases are set in the Odoo database to create records by receiving incoming emails. To
view aliases set in the Odoo database, first activate the :ref:`developer mode <developer-mode>`.
Then, go to :menuselection:`Settings app --> Technical --> Email section --> Aliases`.
The following system parameter, `mail.catchall.domain.allowed`, set with allowed alias domain
values, separated by commas, filters out correctly addressed emails to aliases. Setting the
domain(s) for which the alias can create a ticket, lead, opportunity, etc., eliminates false
positives where email addresses with only the prefix alias (not the domain) are present.
In some instances, matches have been made in the Odoo database when an email is received with the
same alias prefix and a different domain on the incoming email address. This is true in the sender,
recipient, and :abbr:`CC (Carbon Copy)` email addresses of an incoming email.
.. example::
When Odoo receives emails that have the name `commercial` prefix alias in the sender, recipient,
or :abbr:`CC (Carbon Copy)` email address(es) (e.g. commercial@gmail.com, commercial@odoo.net),
the database falsely treats the email as the full `commercial` alias (with a different domain),
and therefore, creates a ticket/lead/opportunity/etc.
.. important::
This alias mismatch issue has been resolved in Odoo 17, however, the
`mail.catchall.domain.allowed` system parameter is still used in Odoo 17 for backward
compatibility.
To add the `mail.catchall.domain.allowed` system parameter, first, activate the :ref:`developer mode
<developer-mode>`. Then, go to :menuselection:`Settings app --> Technical --> Parameters section -->
System Parameters`. Click :guilabel:`Create`. Then, type in `mail.catchall.domain.allowed` for the
:guilabel:`Key` field.
Next, for the :guilabel:`Value` field, add the domain(s) separated by comma(s) (if plural domains).
Manually :guilabel:`Save`, and the system parameter takes immediate effect.
.. image:: email_servers/allowed-domain.png
:align: center
:alt: mail.catchall.domain.allowed system parameter set with key and value highlighted.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

View File

@ -0,0 +1,319 @@
=======================
Manage inbound messages
=======================
An inbound message is an email delivered to an Odoo database. Anyone can send an email to an email
alias created in the database or reply to an email that was previously sent from the database based
on the *reply-to* header.
.. _email-inbound-aliases:
Email aliases
=============
.. _email-inbound-aliases-model:
Model specific aliases
----------------------
Some applications have their specific aliases (sales teams, helpdesk teams, projects, etc.). These
aliases are used to:
- Create a record when an email is sent directly to the alias,
- Receive replies to an email initially sent from a record.
.. example::
.. image:: email_servers_inbound/sales-team-alias-config.png
:alt: The local-part "info" is used for the alias of the sales team.
In the example displayed above, sending an email to `info@company-name.odoo.com` will create a
new opportunity or a new lead automatically assigned to the corresponding sales team. If an email
is sent from the chatter of an existing opportunity, the *reply-to* will be
`info@company-name.odoo.com`. The reply will be posted in the right chatter, according to the
*message-id* header.
.. _email-inbound-aliases-catchall:
Catchall
--------
If an application does not have an alias, a generic fallback alias is used: the catchall. An email
sent from a chatter has a reply address set to this catchall alias. A reply sent to the catchall is
posted to the right chatter thanks to the *message-id* header.
By default, the local-part *catchall* will be used. Enable :ref:`developer-mode` and go to
:menuselection:`Settings --> Technical --> Emails: Alias Domains` to access the configuration.
An email to the catchall always needs to be a reply to a previous email sent from the database. If
an email is sent directly to the catchall, the sender will receive the following message:
.. image:: email_servers_inbound/direct-mail-to-catchall.png
:alt: Bounce email from "MAILER-DEAMON" explaining how to contact the database.
.. note::
The email address `info@company-name.com` displayed in the screenshot above is the email address
set on the company. Upon entering the developer mode on a company profile, additional
configuration options (such as catchall and bounce) become readable. It can be modified by
clicking on the internal link of the Email Domain. It is generally not recommended to modify
these options unless specific needs dictate, as it will affect all replies to previously sent
emails.
.. example::
An alias can be configured on a sales team in the CRM app. When a customer replies to an email
coming from the CRM app, the *reply-to* is `info@company-name.odoo.com`.
When an email is sent from the Contact app, the reply address is `catchall@company-name.odoo.com`
because there is no alias on the contact model.
.. note::
It is advised to keep the local-part of the catchall and the bounce unchanged. If this value is
modified, previous emails sent from the database will still have the previous local-part values.
This could lead to replies not being correctly received in the database.
.. _email-inbound-aliases-bounce:
Bounce
------
In the same way the catchall alias is used to build the reply address, the bounce alias is used to
build the *return-path* of the email. The *return-path* is used when emails cannot be delivered to
the recipient and an error is returned to the sender.
By default the name *bounce* will be used. Enable :ref:`developer-mode` and go to
:menuselection:`Settings --> Technical --> Emails: Alias Domains` to access the configuration.
.. note::
On Odoo Online, when using the default outgoing email server, the return-path address is forced
to the value `bounce@company-name.odoo.com` independently of the value set as bounce alias.
When an error occurs, a notification is received and displayed in a red envelope in the chatter. In
some cases, the red envelope can just contain a `no error` message, meaning there is an error that
could not be handled by Odoo.
A notification will also be displayed in the Discuss icon on the navigation bar.
.. image:: email_servers_inbound/mail-error-notif-navbar.png
:alt: An email sent to a contact had an issue and the error is reported on the navbar.
.. example::
If the email address of the recipient is incorrect, by clicking on the red envelope in the
chatter an error message containing the reason for the failure will be given.
.. image:: email_servers_inbound/red-envelope-info.png
:alt: An email sent to a wrong domain generates a bounce displayed as a red envelope.
.. _email-inbound-default:
Receive emails with Odoo's default configuration
================================================
On **Odoo Online** and **Odoo.sh**, the email alias, reply, and bounce addresses are pre-configured.
These addresses use the alias domain automatically added to a standard database.
.. example::
Assuming the database URL is `https://mydatabase.odoo.com`, the alias domain
`mydatabase.odoo.com` is automatically created. Catchall and bounce can be used and their address
is respectively `catchall@mydatabase.odoo.com`, and `bounce@mydatabase.odoo.com`.
If the CRM app is installed, and a sales team with the alias `info` is created, the
`info@mydatabase.odoo.com` address can be used immediately. The same goes for any other alias
created in other applications.
The database domain is ready to be used to receive emails without any additional configuration.
.. _email-inbound-multiple-subdomains:
Use multiple Odoo subdomains
============================
On **Odoo Online**, the only Odoo subdomain is the one defined at the database creation.
On **Odoo.sh**, it is possible to use several Odoo subdomains. In the settings of the branch,
additional Odoo subdomains can be added as long as they are not used yet in another branch. These
domains must then be added to the alias domains to be used by a company.
.. image:: email_servers_inbound/custom-subdomain-sh.png
:alt: Setting up an Odoo subdomain on a branch.
.. _email-inbound-custom-domain:
Use a custom domain for inbound messages
========================================
The :ref:`alias domain <email-outbound-alias-domain>` must be selected in the general
settings. If you have multiple companies, each one must be configured.
.. image:: email_servers_inbound/alias-domain-settings.png
:alt: The alias domain in the general settings.
All the aliases will use this custom domain. Replies on models for which an alias is configured
are done to `[alias]@my-custom-domain.com`. Replies to other models are sent to the catchall through
`catchall@my-custom-domain.com`.
.. image:: email_servers_inbound/diagram-mail-custom-domain.png
:alt: Technical schema of mailing route when using a custom domain in Odoo.
.. important::
If emails are sent using Odoo's email servers while using a custom domain, follow the
:ref:`"Using a custom domain with Odoos email server" instructions
<email-outbound-custom-domain-odoo-server>`.
Since this custom domain is used, all emails using an alias (replies, bounces and direct
sends) are sent to an address of the domain. They are thus delivered to the email server linked to the domain (MX record). To
display them in the chatter or to create new records, it is necessary to retrieve these incoming
emails in the Odoo database.
.. list-table::
:header-rows: 1
:stub-columns: 1
* - Method
- Benefits
- Drawbacks
* - :ref:`Redirections <email-inbound-custom-domain-redirections>`
- Easy to set up, emails are directly sent to the database.
- Each alias of a database needs to be configured.
* - :ref:`Incoming mail servers <email-inbound-custom-domain-incoming-server>`
- Allows to keep a copy of the email in your mailbox (with IMAP).
Allows to create records in the chosen model.
- Depends on a CRON, meaning emails are not retrieved immediately in the database.
Each alias of a database needs to be configured.
* - :ref:`MX record <email-inbound-custom-domain-mx>`
- Only one record needs to be created to make all aliases work properly.
- Using a subdomain is required.
Requires advanced technical knowledge.
.. important::
For **on-premise databases**, the redirection and the MX record methods also require configuring
the :doc:`mail gateway script <../../../../administration/on_premise/email_gateway>`. Going
through this script requires **advanced technical and infrastructure knowledge**.
.. important::
Refer to your providers documentation for more detailed information on how to handle the methods
detailed below.
.. _email-inbound-custom-domain-redirections:
Redirections
------------
If the database is hosted on **Odoo Online** or **Odoo.sh**, using redirections is recommended. They
allow messages to be received without delay in the database.
It is mandatory to redirect the catchall and bounce address to the Odoo subdomain of the database.
Every other alias used must be redirected as well.
.. example::
With one sales team, the following redirections are required:
- `catchall@company-name.com``catchall@company-name.odoo.com`
- `bounce@company-name.com``bounce@company-name.odoo.com`
- `info@company-name.com``info@company-name.odoo.com`
.. important::
Some providers ask to validate the redirection by sending a link to the target email address.
This procedure is an issue for catchall and bounce since they are not used to create records.
#. Modify the catchall value on the mail alias domain. :ref:`developer-mode` must be enabled to
access this menu. For example, it can be changed from `catchall` to `temp-catchall`. This will
allow to use `catchall` as the local-part of another alias.
#. Open an app that uses an alias. For example, CRM contains aliases for each sales team. Set
`catchall` as the local-part of the alias of a sales team.
#. The validation email will create a record in the CRM app. The email sent will be visible in
the chatter, allowing you to validate the redirection.
#. Do not forget to change back the alias of the sales team and the catchall value on the mail
alias domain, just as they were before this procedure.
.. note::
An alternative to redirections is **forwarding**. With forwarding, **the address forwarding the
email will be identified as the sender**, while with redirections, the original sender will
always remain.
.. _email-inbound-custom-domain-incoming-server:
Incoming mail servers
---------------------
As mentioned earlier, using redirections is the recommended method to receive emails in Odoo.
However, it is also possible to set up incoming mail servers. Using this method means creating an
incoming email server for each mailbox on your server, catchall, bounce, and every alias of the
database, in order to fetch all incoming emails. Incoming mail servers are created by going to
:menuselection:`Settings --> Technical --> Emails: Incoming Mail Servers`.
.. important::
We recommend using the IMAP protocol over the POP protocol, as IMAP fetches all unread emails,
while POP fetches all the emails' history and then tags them as deleted in your mailbox.
.. tip::
It is also possible to connect a mailbox through :doc:`Gmail with Google OAuth <google_oauth>` or
:doc:`Outlook with Microsoft Azure OAuth <azure_oauth>`.
Regardless of the protocol chosen, emails are fetched using the *Mail: Fetchmail Service* scheduled
action.
Additionally, using an incoming mail server in Odoo gives the opportunity to create new records in a
specified model. Each incoming mail server can create records in a different model.
.. example::
Emails received on `task@company-name.com` are fetched by the Odoo database. All fetched emails will
create a new project task in the database.
.. image:: email_servers_inbound/incoming-mail-server.png
:alt: Technical schema of mailing route when using a custom domain in Odoo.
.. _email-inbound-custom-domain-mx:
MX record
---------
A third option is to create a MX record in your DNS zone which specifies the mail server managing
emails sent to your domain. **Advanced technical knowledge is required.**
.. important::
This configuration only works with a subdomain on the Odoo Online or Odoo.sh infrastructure
(e.g., `@mail.mydomain.com`)
Below are presented some specifications depending on the hosting type:
.. tabs::
.. group-tab:: Odoo Online
The custom subdomain must be added to your :doc:`Odoo Portal
<../../websites/website/configuration/domain_names>`.
.. group-tab:: Odoo.sh
The custom subdomain must be added to the :doc:`settings of the project
<../../../administration/odoo_sh/getting_started/settings>`:
.. image:: email_servers_inbound/custom-subdomain-sh.png
:alt: Adding a custom subdomain for mail to Odoo.sh project settings.
.. _email-inbound-loops:
Infinite email loops
====================
In some cases, infinite mailing loops can be created. Odoo provides some protection against such
loops, ensuring the same sender cannot send too many emails **that would create records** to an alias in
a specific time span.
By default, an email address can send up to 20 emails in 120 minutes. If more emails are sent, they
are blocked and the sender receives the following message:
.. image:: email_servers_inbound/bounce-mail-loop.png
:alt: Bounce email received after attempting contact too many times an alias.
To change the default behavior, enable :ref:`developer-mode`, then go to :menuselection:`Settings
--> Technical --> Parameters: System Parameters` to add two parameters.
- For the first parameter, enter `mail.gateway.loop.minutes` as the :guilabel:`Key` and choose a
number of minutes as the :guilabel:`Value` (`120` is the default behavior).
- For the second parameter, enter `mail.gateway.loop.threshold` as the :guilabel:`Key` and choose a
number of emails as the :guilabel:`Value` (`20` is the default behavior).
.. important::
These parameters are only used to prevent the creation of new records. They **do not prevent
replies** from being added to the chatter.

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,332 @@
========================
Manage outbound messages
========================
.. _email-outbound-default:
Sending emails with Odoo's default configuration
================================================
On **Odoo Online** and **Odoo.sh**, sending and receiving emails works out of the box. No
configuration is required.
When a database is created, the subdomain `company-name.odoo.com` is used to send and receive
emails. The deliverability is optimized for this subdomain as it uses Odoos DNS configuration.
.. example::
If the database subdomain is `company-name.odoo.com` and all mailing configurations are the
default ones, all emails will be sent from `notifications@company-name.odoo.com`.
.. image:: email_servers_outbound/diagram-inbound-mailing-method.png
:alt: Odoos default outbound messages configuration.
Emails are sent with `catchall@company-name.odoo.com` as the *reply-to* address. In addition,
delivery errors are sent to `bounce@company-name.odoo.com`.
.. note::
The catchall, bounce, and notification addresses do not work like other aliases. They do not have
the vocation to create records in a database. Emails sent to an alias are automatically routed
and will reply to an existing and linked record or will create a new one in the database.
.. _email-outbound-custom-domain:
Using a custom domain to send emails
====================================
The database can be configured to use a custom domain, in which case all default email addresses are
built using the custom domain. If the custom domain is `company-name.com`, the sender address will
be `notifications@company-name.com`, the *reply-to* address `catchall@company-name.com`, and the
*bounce* address `bounce@company-name.com`. The custom domain can be utilized when sending emails
either with Odoos email servers or an external one.
This section assumes ownership of a custom domain. If not, a custom domain must be purchased from a
domain registrar such as GoDaddy, Namecheap, or any alternative provider.
.. _email-outbound-custom-domain-odoo-server:
Using a custom domain with Odoos email server
----------------------------------------------
On **Odoo Online** or **Odoo.sh**, some configurations are mandatory in the custom domain's DNS to
ensure good deliverability.
.. warning::
Most of the configuration will be done on the domain providers side, and it might require some
configuration on the mail server itself. **Some technical knowledge is required.**
The first step is to configure the :ref:`SPF <email-domain-spf>` and :ref:`DKIM <email-domain-dkim>`
to be compliant with Odoos mail server.
Next, the custom domain must be set as the alias domain of a company. Select the company, open the
:guilabel:`Settings`, and add the custom domain under the :guilabel:`Alias Domain` field.
After adding the alias domain, click the :icon:`oi-arrow-right` (:guilabel:`internal link`) icon to
assign more companies to the custom domain if needed. Enable the :ref:`developer-mode` mode to
modify the default aliases if desired:
- :guilabel:`Bounce Alias`: the mailbox used to catch delivery errors and populate the :ref:`red
envelope <email-issues-outgoing-delivery-failure>` on the corresponding message.
- :guilabel:`Catchall Alias`: the default mailbox used to centralize all replies.
- :guilabel:`Default From Alias`: the default sender address.
.. note::
At the creation of the first alias domain, all companies will use it. If you create a new
company, the alias domain automatically set is the one with the lowest priority (ad displayed on
the alias domain list in :ref:`developer-mode`).
All email aliases (e.g., related to CRM or Helpdesk teams) must have their corresponding mailbox in
the custom domain mail server.
.. image:: email_servers_outbound/diagram-owned-domain-odoo-server.png
:alt: Technical schema of external mail server configuration with Odoo.
To receive emails in the Odoo database within the corresponding chatter (CRM, invoices, sales
orders, etc.), one of these three methods must be used:
- :ref:`Redirections/forwarding <email-inbound-custom-domain-redirections>`,
- :ref:`Incoming mail servers <email-inbound-custom-domain-incoming-server>`,
- :ref:`MX record <email-inbound-custom-domain-mx>` (requires advanced technical knowledge)
Using a custom domain implies that specific :ref:`local-parts
<email-outbound-custom-domain-smtp-server-local-part>` might be used by Odoo to send emails.
.. _email-outbound-custom-domain-smtp-server:
Sending emails with an external SMTP server
-------------------------------------------
.. note::
If utilizing your own outgoing mail server, it must be paired with your own domain, as updating
the DNS of an Odoo subdomain is not feasible.
To add an external SMTP server in Odoo, open :guilabel:`Settings`, and enable the :guilabel:`Use
Custom Email Servers` option found under the :guilabel:`Discuss` section.
Still under the :guilabel:`Discuss` section, click :guilabel:`Outgoing Email Servers`, then `New` to
create an outgoing mail server record. Most fields are the common parameters used to set up a
connection to an SMTP server; use the values provided by your email provider.
Once completed, click :guilabel:`Test Connection`. Note that a successful test connection does not
confirm that the email will go out as some restriction might remain on the provider side, thus, it
is recommended to consult your providers documentation.
.. _email-outbound-custom-domain-smtp-server-local-part:
Local-part values
~~~~~~~~~~~~~~~~~
Below are presented the different local-part values that can be used by Odoo to send emails. It
might be required to whitelist them in your mail server:
- The Alias Domain Bounce Alias (default value = `bounce`),
- The Alias Domain Default From (default value = `notifications`),
- The default admin address `admin@company-name.odoo.com` or, if changed, the new value),
- The default Odoobot address `odoobot@company-name.odoo.com` or, if changed, the new value),
- The specific FROM defined on an email marketing campaign,
- The specific FROM that can be defined in an email template.
.. seealso::
- :doc:`google_oauth`
- :doc:`azure_oauth`
.. _email-outbound-different-servers:
Setting up different servers for transactional and mass emails
==============================================================
.. _email-outbound-different-servers-personalized:
Personalized mail servers
-------------------------
Transactional emails and mass mailings can be sent using separate email servers in Odoo. Doing so
means day-to-day emails, quotations, or invoices sent to clients will be handled as *transactional
emails*. *Mass mailing emails*, including the sending of batches of invoices or quotations, will be
managed by the Marketing Automation or Email Marketing application.
.. example::
You can use services like Gmail, Amazon SES, or Brevo for transactional emails, and services like
Mailgun, Sendgrid, or Mailjet for mass mailings.
First, activate the :ref:`developer-mode` and go to :menuselection:`Settings --> Technical -->
Email: Outgoing Mail Servers`. There, add two outgoing email server records, one for the
transactional emails server and one for the mass mailings server. Enter a lower :guilabel:`Priority`
value for the transactional server (e.g., `1`) over the mass mailings server (e.g., `2`) so
transactional emails are given priority.
.. image:: email_servers_outbound/split-transaction-massmail-mail-servers.png
:alt: Example of split between transaction and mass mailing mail servers.
Now, go to :menuselection:`Email Marketing --> Configuration --> Settings`, enable
:guilabel:`Dedicated Server`, and select the appropriate email server. Odoo uses the server
with the lowest priority value for transactional emails, and the server selected here for mass
mailings.
.. image:: email_servers_outbound/dedicated-mass-mail-server.png
:alt: Dedicated mail server on Email Marketing app settings.
.. _email-outbound-different-servers-personalized-from-filtering:
FROM filtering
~~~~~~~~~~~~~~
.. important::
Its **highly recommended** to configure the FROM Filtering on the outgoing mail servers as per
the instructions of your provider.
The :guilabel:`FROM Filtering` field allows for the use of a specific outgoing email server
depending on the *From* email address or domain that Odoo is sending on behalf of. The **value must
be a domain or a complete address** that matches the senders email address and is trusted on the
outgoing mail server provider's side.
If FROM filtering is not used, emails will go out using the notification address.
.. warning::
Some outgoing mail servers require a specific configuration of the FROM filter.
When an email is sent from Odoo, the following sequence is used to choose the outgoing email server:
- First, Odoo searches for a server that has the same FROM filtering value as the From value (i.e.,
email address) defined in the outgoing email. This configuration is ideal if all users of a
company share the same domain but have different local-parts.
.. example::
If the sender's email address is `test@example.com`, only an email server having a FROM filtering
value equal to `test@example.com` or `example.com` can be used.
- If no server is found based on the first criteria, Odoo looks for the first server
without a FROM filtering value set. The email will be overridden with the notification address.
- If no server is found based on the second criteria, Odoo uses the first server, and the email will
be overridden with the notification address.
.. note::
To determine which server is first, Odoo uses the priority value (the lower the value is, the
higher the priority is). Failing to do so, the first server is determined by the servers' names,
using alphabetical order.
It is also possible to use Odoo's mail server for transactional emails in addition to mass mailings.
.. _email-outbound-different-servers-external-odoo:
Using an external email server and Odoos default server
--------------------------------------------------------
On Odoo Online and Odoo.sh, databases are started with Odoo's SMTP server. If no outgoing mail
server is set, the default Odoo's SMTP server will be used.
.. image:: email_servers_outbound/command-line-interface-option-mail-server.png
:alt: Adding a mail server using the Odoo's mail server with the CLI authentication.
.. example::
If an outgoing mail server is used simultaneously with Odoos default server (CLI), the FROM
filter of the outgoing mail server must contain a custom domain, and the FROM filter of the CLI
must contain Odoos subdomain. If there is no FROM filtering, the email will go out using the
notification address.
.. image:: email_servers_outbound/split-mail-servers.png
:alt: Splitting of Odoo mail server for transactional emails and Mail server for Mass mailing.
.. note::
On Odoo Online, the command line interface is equivalent to the default Odoo mail
server, using the same limit as if there was no outgoing mail server in place.
.. tip::
On Odoo Online, the page also shows your daily email usage and your daily limit. On Odoo.sh, you
need to check on the monitor page the number of outgoing emails that were sent.
.. note::
On Odoo.sh, to use the command-line interface, an outgoing mail server can be configured on the
configuration file.
.. warning::
Odoos mail server is meant for transactional emails and small-scale marketing campaigns. The
:ref:`daily limit <email-issues-outgoing-delivery-failure-messages-limit>` depends on the
database type and the applications used.
.. _email-outbound-custom-domain-external-server:
Using a custom domain with an external email server
===================================================
Similar to the :ref:`previous chapter <email-outbound-different-servers-external-odoo>`, proper
configuration might be needed to ensure that the external email server is allowed to send emails
using your custom domain. Refer to your providers documentation to properly set up the relevant
records (SPF, DKIM, and DMARC). A list of the :ref:`most common providers is available
<email-domain-providers-documentation>`.
.. note::
DNS configuration is required when you use your own domain. If an external outgoing mail server
is used, configuring the records as described in the :doc:`Odoo DNS configuration for our mail
servers documentation <email_domain>` **will not have the desired effect**, as it is independent
of Odoo when using a custom email server. Odoo does not allow the configuration of Odoo's
subdomain.
.. _email-outbound-port-restriction:
Port restriction
================
Port 25 is blocked for security reasons on Odoo Online and Odoo.sh. Try using port 465, 587, or 2525
instead.
.. _email-outbound-alias-domain:
Alias domain
============
The catchall domain is company-specific. By default, all companies share Odoos subdomain (e.g.,
`company-name.odoo.com`), but each company may have its own custom email domain.
When the :ref:`developer-mode` is activated, the alias domain options are available by going to
:menuselection:`Settings --> Technical --> Email: Alias Domains`.
.. warning::
Any modification of the alias domain must be done very carefully. If one of the aliases (bounce,
catchall, default from) is changed, all previous emails that are not properly redirected to the
new aliases will be lost.
The :guilabel:`Default From Alias` field can be filled with a local-part of the email address (by
default `notifications`) or a full email address. Configure it to determine the `FROM` header of
your emails. If a full email address is used, all outgoing emails will be overwritten with this
address.
.. _email-outbound-notifications:
Notification system
===================
When an email is sent from the chatter, customers can reply directly to it. If a customer replies
directly to an email, the answer is logged in the same chatter, thus functioning as a message thread
related to the record.
Upon receiving the reply, Odoo then uses the subscribed followers (based on the subscribed subtypes)
to send them a notification by email, or in the Odoo inbox, depending on the users preferences.
.. example::
If a customer with the email address `“Mary” <mary@customer.example.com>` makes a direct reply to
an email coming from the Odoo database, Odoo's default behavior is to redistribute the email's
content to all other followers within the thread.
As Marys domain does not belong to the alias domain, Odoo overrides the email address and uses
the notification email address to notify the followers. This override depends on the
configuration done in the database. By default, on Odoo Online and Odoo.sh, the email `FROM`
address will be overridden with the value `notifications@company-name.odoo.com` instead of
`mary@customer.example.com`.
The address is constructed using the name of the sender and
`{alias domain, default from alias}`@`{alias domain, domain name}`, by default,
`notifications@company-name.odoo.com`.
.. _email-outbound-unique-address:
Using a unique email address for all outgoing emails
====================================================
To force the email address from which emails are sent, activate the :ref:`developer-mode`, and go to
:menuselection:`Settings --> Technical --> Email: Alias Domains`. On the :guilabel:`Default From
Alias`, use the the local-part or a complete email address as the value.
.. warning::
If a **complete address** is used as the :guilabel:`Default From Alias` value, **all** outgoing
emails will be overwritten by this address.

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@ -1,238 +1,375 @@
============
Email issues
============
====================================
Common emailing issues and solutions
====================================
This document contains an explanation of the most recurring emailing issues in Odoo.
This page lists the most common emailing issues and their solutions.
.. _email-issues-provider:
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 :ref:`a contact is notified
<email-outbound-notifications>` 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.
.. _email-issues-outgoing:
Outgoing emails
===============
.. _red_envelop:
.. _email-issues-outgoing-admin-address:
Email is not sent
-----------------
Changing the email address of the admin user account
----------------------------------------------------
The first indicator showing that an email has not been sent is the presence of a red
:icon:`fa-envelope` :guilabel:`(envelope)` icon, next to the date and time of the message, located
in the chatter.
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.
.. image:: faq/red-envelop.png
:align: center
:alt: Red envelope icon displayed in chatter.
To do so, on the admin account, click the user icon, click :guilabel:`My Profile` (or
:guilabel:`Preferences`), and update the :guilabel:`Email` field found under the
:guilabel:`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`).
Unsent emails also appear in the Odoo email queue. In :ref:`developer mode <developer-mode>`, the
email queue can be accessed by going to :menuselection:`Settings app --> Technical menu --> Email
--> Emails`. Unsent emails appear in turquoise, while sent emails appear in grey.
.. _email-issues-outgoing-delivery-failure:
Delivery failure
----------------
When a message is sent, an :icon:`fa-envelope-o` :guilabel:`(envelope)` icon is displayed in the
chatter. The icon turns red when delivery has failed for at least one recipient.
.. image:: faq/red-envelope.png
:alt: Red envelope icon displayed in the chatter.
Left-click the envelope to display information about the delivery, and, if possible, the relevant
:ref:`error messages <email-issues-outgoing-delivery-failure-messages>`.
.. image:: faq/sending-failures.png
:alt: Example of a sending failure.
Click :guilabel:`See Error Details` to get extra information for the fail reason, **if** Odoo was
able to process the original error or bounce email.
Click :guilabel:`Send & close` to retry sending the email to all **toggled-on**
(:icon:`fa-toggle-on`) recipients under the :guilabel:`Try Again` column. All **toggled-off**
(:icon:`fa-toggle-off`) recipients will be ignored.
Click :guilabel:`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 :ref:`developer mode
<developer-mode>` and go to :menuselection:`Settings --> Technical --> Email: Emails`.
.. image:: faq/technical-menu-email-delivery-failed.png
:alt: Example of the technical email queue view.
Failed emails display the :guilabel:`Delivery Failed` status. Click :guilabel:`Retry` to put a
failed email in the email queue again. It will then appear with the :guilabel:`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 :guilabel:`Send Now`. Click
:guilabel:`Cancel Email` to remove it from the email queue.
.. note::
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.
.. _email-issues-outgoing-delivery-failure-messages:
Common error messages
~~~~~~~~~~~~~~~~~~~~~
.. _email_communication/daily_limit_mail:
.. _email-issues-outgoing-delivery-failure-messages-limit:
Daily limit reached
*******************
.. image:: faq/email-limit.png
:align: center
:alt: Warning in Odoo upon email limit reached.
:alt: Email limit reached warning.
Each email service provider has its own email sending limits. The limits may be daily, hourly, or
sometimes, per minute. This is the same for Odoo, which limits a customer's sending to prevent
Odoo's email servers from being blacklisted.
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.
Here are the default limits for new databases:
The default daily email limit varies between **5 and 200 emails**. The exact limit is depends on
several factors (subject to change):
- **200 emails per day** for Odoo Online and Odoo.sh databases with an active subscription.
- **50 emails per day** for one-app free and trial databases.
- 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 :ref:`Odoo Support <email-issues-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 :ref:`email aliases are correctly set up and use the appropriate custom domains
<email-outbound-alias-domain>`.
.. tip::
When using a custom domain, verify that :ref:`SPF <email-domain-spf>`, :ref:`DKIM
<email-domain-dkim>`, and :ref:`DMARC <email-domain-dmarc>` are correctly configured so that
:ref:`Odoo's email servers are allowed to send emails on your custom domain's behalf
<email-outbound-custom-domain-odoo-server>`.
- :doc:`Use an external outgoing email server <../email_communication>` to be independent of Odoo's
email limit.
- Wait until the next day, and retry sending the email. To do so, activate the :ref:`developer mode
<developer-mode>`, go to :menuselection:`Settings --> Technical --> Email: Emails`, and click
:guilabel:`Retry` next to the unsent email.
.. important::
In a one-app free database, if the *Email Marketing* app is installed, the email limit is **20
emails per day**.
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 :ref:`notifications in
Odoo <discuss_app/notification_preferences>` instead of by email.
.. note::
In the case of migration, the daily limit might be reset to 50 emails per day.
If the daily limit is reached:
- Contact the Odoo support team, who may increase the daily limit, depending on the following
factors:
#. How many users are in the database?
#. Which apps are installed?
#. The bounce rate: the percentage of email addresses that did not receive emails because they
were returned by a mail server on its way to the final recipient.
- Use an external outgoing email server to be independent of Odoo's mail limit (refer to the
corresponding :doc:`email documentation
</applications/general/email_communication/email_servers>`).
- Wait until 11 PM (UTC) for the daily limit to reset, and retry sending the email. In
:ref:`developer mode <developer-mode>`, go to :menuselection:`Settings app --> Technical menu -->
Email --> Emails`, then click the :guilabel:`Retry` button next to an unsent email.
.. warning::
The daily email limit is comprehensive to the database. By default, any internal message,
notification, logged note, etc. counts as an email in the daily limit if it notifies someone via
email. This can be mitigated by receiving :ref:`notifications in Odoo
<discuss_app/notification_preferences>`, instead of emails.
.. _email-issues-outgoing-delivery-failure-messages-smtp:
SMTP error
**********
*Simple Mail Transport Protocol (SMTP)* error messages explain why an email was not transmitted
successfully. :abbr:`SMTP (Simple Mail Transport Protocol)` is a protocol to describe the email
structure, and transmits data from messages over the Internet. The error messages generated by email
services are helpful tools to diagnose and troubleshoot email problems.
`Simple Mail Transport Protocol (SMTP)
<https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol>`_ is a standard used to transmit
emails between email servers and/or email clients.
If you use :ref:`an external STMP server to send emails <email-outbound-custom-domain-smtp-server>`,
a standard set of `SMTP error codes exists
<https://en.wikipedia.org/wiki/List_of_SMTP_server_return_codes#Common_status_codes>`_. 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::
This is an example of a 554 SMTP permanent delivery error: `554: delivery error: Sorry, your
message to ------@yahoo.com cannot be delivered. This mailbox is disabled (554.30). -
mta4471.mail.bf1.yahoo.com --- Below this line is a copy of the message.`
A 550 SMTP permanent delivery error from sendgrid.com:
The debug menu can be used to investigate SMTP sending issues from a database. To access the menu,
:ref:`developer mode <developer-mode>` **must** be activated. Once activated, navigate to the
:menuselection:`Debug Menu` in the top-right of the menu bar (the :icon:`fa-bug` :guilabel:`(bug)`
icon), and select :menuselection:`Debug Menu --> Manage Messages` from the resulting drop-down menu.
.. code-block:: text
The :guilabel:`Manage Messages` menu opens a list of all the messages sent in a particular record.
Within each message there is information on sending, including the type, and subtype, of the
message.
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
Other information includes to whom the message was sent, and whether Odoo received a bounce-back
message from an email server.
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.
.. image:: faq/manage-messages.png
:align: center
:alt: Manage messages menu option on the debug menu.
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.
.. note::
A user must be on a view in Odoo that has a chatter in order for the :guilabel:`Manage Messages`
menu option to appear.
If the issue cannot be resolved and keeps occurring, contact :ref:`Odoo Support
<email-issues-support>`.
.. _email-issues-outgoing-delivery-failure-messages-no-error:
No error populated
^^^^^^^^^^^^^^^^^^
******************
Odoo is not always capable of providing information for the reason it failed. The different email
providers implement a personalized policy of bounced emails, and it is not always possible for Odoo
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 this is a recurring problem with the same client, or the same domain, do not hesitate to contact
`Odoo Support <https://www.odoo.com/help>`_ for help in finding a reason.
If there is a recurring problem with the same customer or the same domain, contact :ref:`Odoo
Support <email-issues-support>`.
.. note::
One of the most common reasons for an email failing to send with no error message is related to
:ref:`SPF <email_communication/spf_compliant>` and/or :ref:`DKIM
<email_communication/DKIM_compliant>` configuration. Also, check to make sure the
`mail.bounce.alias` is defined in the *system parameters*. Access system parameters in
:ref:`developer mode <developer-mode>` by navigating to :menuselection:`Settings app -->
Technical menu --> Parameters --> System Parameters`.
One of the most common reasons for an email failing to be sent with no error message is related
to the :ref:`SPF <email-domain-spf>` or :ref:`DKIM <email-domain-dkim>` configuration. Also,
verify that the implemented email notification setup is adapted to your business needs. See the
:doc:`Communication in Odoo by email documentation <../email_communication>` for more
information.
.. _email_communication/email-sent-late:
.. _email-issues-outgoing-execution-time:
Email is sent late
------------------
Execution time
--------------
Email campaigns send at a scheduled time, using a delay pre-programed in the database. Odoo uses a
delayed task to send emails that are considered "not urgent" (newsletter formats, such as: mass
mailing, marketing automation, and events). The system utility **cron** can be used to schedule
programs to run automatically at predetermined intervals. Odoo uses that policy to avoid cluttering
the mail servers and, instead, prioritizes individual communication. This **cron** is called
:guilabel:`Mail: Email Queue Manager`, and can be accessed in :ref:`developer mode <developer-mode>`
by going to :menuselection:`Settings app --> Technical menu --> Automation: Scheduled Actions`.
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.
.. image:: faq/email-scheduled-later.png
:align: center
:alt: Email scheduled to be sent later.
.. spoiler:: What is a cron?
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 :guilabel:`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 :menuselection:`Settings -->
Technical --> Email: Emails`, unless their delivery fails.
.. image:: faq/email-marketing-asap-notice.png
:alt: Example of sending information header when a mailing campaign is queued.
Email campaigns are sent as soon as possible (after clicking the :guilabel:`Send` button) or at a
scheduled time (after clicking the :guilabel:`Schedule` button).
For the email marketing queue, the :guilabel:`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.
.. tip::
What is a **cron**? A cron is an action that Odoo runs in the background to execute particular
code to complete a task.
To edit crons, enable the :ref:`developer mode <developer-mode>` and go to
:menuselection:`Settings --> Technical --> Automation: Scheduled Actions`.
.. important::
By default, the *Mass Mailing cron* runs every 60 minutes. This can be changed to no less than 5
minutes. However, running the action every 5 minutes would bog down the Odoo database (stress the
system), so this is not recommended. To edit the mass mailing cron, select the scheduled action
:guilabel:`Mail: Email Queue Manager`, and proceed to make any necessary adjustments.
.. seealso::
For more information about crons when using Odoo.sh, check out :doc:`Odoo.sh frequent technical
questions <../../../administration/odoo_sh/advanced/frequent_technical_questions>`.
Emails that are considered urgent (communication from one person to another, such as sales orders,
invoices, purchase orders, etc.) are sent immediately.
.. _email-issues-outgoing-execution-time-campaigns:
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
:guilabel:`Send` on all three of them.
.. image:: faq/email-marketing-order-queue-example.png
:alt: Example of three email marketing campaigns.
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
:guilabel:`Cancel` button, and see if the two other campaigns are sent. Then we could try to fix
Campaign_1 or contact :ref:`Odoo Support <email-issues-support>`.
.. _email-issues-incoming:
Incoming emails
===============
When there is an issue with incoming emails, there might not be an indication in Odoo. It is the
sending email client, who tries to contact a database, that gets a bounce-back message (most of the
time it is a :guilabel:`550: mailbox unavailable` error message).
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 :guilabel:`550: mailbox unavailable` error message).
.. _email-issues-incoming-not-received:
Email is not received
---------------------
The steps that should be taken depend on the Odoo platform where the database is hosted.
.. tabs::
**Odoo.sh** users can find their live logs on the folder :file:`~/logs/`.
.. tab:: Odoo Online
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. Failure to send can also be seen by logs that indicate
that the message tried to send repeatedly. Logs will show every action to the email servers from the
database.
Contact :ref:`Odoo Support <email-issues-support>` if there is a recurring issue with the same
client or domain.
The folder :file:`~/logs/` (accessed by the command line or on the Odoo.sh dashboard) of an Odoo.sh
database contains a list of files containing the logs of the database. The log files are created
everyday at 5:00 AM (UTC).
.. tab:: Odoo.sh
.. tip::
The two most recent days (today and yesterday) are not compressed, while the older ones are, in
order to save space. The naming of the files for today and yesterday are respectively:
:file:`odoo.log` and :file:`odoo.log.1`.
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.
For the following days, they are named with their dates, and then compressed. Use the command
:command:`grep` and :command:`zgrep` (for the compressed ones) to search through the files.
Live logs are located in the :file:`~/logs/` folder (accessed by the command line or on the
Odoo.sh dashboard). Log files are created everyday at 5:00 AM (UTC).
.. seealso::
For more information on logs and how to access them via the Odoo.sh dashboard, see :ref:`this
administration documentation <odoosh/logs>`.
.. tip::
The two most recent files, for the current day and the previous one, are named
:file:`odoo.log` and :file:`odoo.log.1`.
For more information on accessing logs via the command line visit :ref:`this developer
documentation <reference/cmdline/server/logging>`.
Log files for older dates are named using their dates and are compressed. Use the commands
:command:`grep` and :command:`zgrep` (for the compressed ones) to search through the files.
**Odoo Online** users won't have access to the logs. However `Odoo Support
<https://www.odoo.com/help>`_ can be contacted if there is a recurring issue with the same client or
domain.
.. seealso::
For more information on logs and how to access them via the Odoo.sh dashboard, refer to the
:ref:`Odoo.sh logs documentation <odoosh/logs>`.
Get help from Odoo support
==========================
For more information on accessing logs via the command line, refer to the :ref:`developer
logging documentation <reference/cmdline/server/logging>`.
In order to get helped efficiently, please provide as much information as possible. Here is a list
of what can be helpful when reaching out to the Odoo Support team about an issue:
.. _email-issues-support:
#. Send a copy of the email headers. The `.EML` file (or **headers**) of the email is the file
format containing all the technical information required for an investigation. The documentation
from the email provider might explain how to access the EML file/header files. Once the headers
of the email are obtained, adding it into the Odoo Support ticket is the most efficient way for
the Odoo Support team to investigate.
Information for Odoo Support
============================
Here is a list of helpful information to include when reaching out to `Odoo Support
<https://www.odoo.com/help>`_:
#. 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.
.. seealso::
- `Gmail documentation on headers <https://support.google.com/mail/answer/29436>`_
- `Outlook documentation on headers
<https://support.microsoft.com/en-us/office/view-internet-message-headers-in-outlook-cd039382-dc6e-4264-ac74-c048563d212c#tab=Web>`_
- `Gmail Help Center: Trace an email with its full header
<https://support.google.com/mail/answer/29436>`_
- `Microsoft Support: View internet message headers in Outlook <https://support.microsoft.com/en-us/office/view-internet-message-headers-in-outlook-cd039382-dc6e-4264-ac74-c048563d212c#tab=Web>`_
#. Explain the exact flow that is being followed to normally receive those emails in Odoo. Here are
examples of questions whose answers can be useful:
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.
.. tip::
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 somehow being redirected?
- Is there an incoming email server being used, or is the email being redirected/forwarded
through a custom email server or provider?
- Is there an example of an email that has been correctly forwarded?
- Have you changed any email-related settings recently? Did it stop working after those changes?
#. Provide answers to the following questions:
#. 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
exactly?
- 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 :ref:`red envelope <red_envelop>`.
.. note::
The bounce system parameter needs to be set in the technical settings in order for the database
to correctly receive bounce messages. To access this setting, go to :menuselection:`Settings app
--> Technical menu --> Parameters: System Parameters`. Then, select the parameter name
:guilabel:`mail.bounce.alias` and set the value to `bounce` if it is not already set.
the Odoo database and display the :ref:`red envelope <email-issues-outgoing-delivery-failure>`.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -33,8 +33,8 @@ port number. The settings are needed to configure Mailjet in Odoo, which is cove
<https://documentation.mailjet.com/hc/articles/360043229473>`_
.. important::
Odoo blocks `port 25` on Odoo Online and Odoo.sh databases. :ref:`See reference here
<email_servers/restriction>`.
Odoo :ref:`blocks port 25 <email-outbound-port-restriction>` on Odoo Online and Odoo.sh
databases.
.. image:: mailjet_api/smtp-config.png
:align: center
@ -187,8 +187,7 @@ settings can be found on :menuselection:`Mailjet --> Account Settings --> SMTP
Settings`.
Then, if the Mailjet server is used for mass emailing, set the :guilabel:`Priority` value higher
than that of any transactional email server(s). Finally, save the settings and :guilabel:`Test the
Connection`.
than that of any transactional email server(s). Finally, save the settings and :guilabel:`Test the Connection`.
.. image:: mailjet_api/server-settings.png
:align: center
@ -200,18 +199,18 @@ Connection`.
#. The :guilabel:`From Filter` needs to be set on the server configuration. It is recommended
to set it as a domain and not a full email address. It should match the domain in the two
proceeding steps. More information can be referenced :ref:`here
<email_communication/from_filter>`.
proceeding steps. For more information, check out the :ref:`FROM filtering documentation
<email-outbound-different-servers-personalized-from-filtering>`.
#. The :guilabel:`mail.default.from` system parameter must have the value
`notifications\@yourdomain.com`.
#. The :guilabel:`mail.default.from_filter` system parameter must have the value
`yourdomain.com`. Replace `yourdomain` with the custom domain for the Odoo database. If there
isn't one, then use the :guilabel:`mail.catchall.domain` system parameter.
For more information see :ref:`Using a default email address <email_communication/default>`.
For more information, check out the :ref:`"Using a unique email address" documentation
<email-outbound-unique-address>`.
The :guilabel:`System Parameters` can be accessed by activating the :ref:`developer mode
<developer-mode>`.
The :guilabel:`System Parameters` can be accessed by activating the :ref:`developer-mode`.
Once the setup is complete, the Odoo database is ready to use the Mailjet email server for mass
mailing or transactional emails!
mailing or transactional emails.

View File

@ -104,7 +104,7 @@ The following define possible reasons for a high bounce rate or low received rat
likely to result in a high bounce rate and/or a low received rate.
- Mailings sent using a *From* email address that differs from the sender's domain are likely to
bounce with certain email providers due to failing :ref:`DMARC authentication
<email_communication/DMARC_compliant>`.
<email-domain-dmarc>`.
- Failing to :doc:`configure the proper DNS records
<../../general/email_communication/email_domain>` can also result in a high bounce rate.

View File

@ -424,7 +424,7 @@ recipients to quickly register.
.. tip::
Sending emails from Odoo is subject to a daily limit, which, by default, is 200. To learn more
about daily limits, visit the :ref:`email_communication/daily_limit_mail` documentation.
about daily limits, visit the :ref:`email-issues-outgoing-delivery-failure-messages-limit` documentation.
.. seealso::
:doc:`track_manage_talks`

View File

@ -191,7 +191,7 @@ options are: :guilabel:`Hours`, :guilabel:`Days`, :guilabel:`Weeks`, and :guilab
.. example::
If the interval number is set to `0` and the interval type is set to :guilabel:`Hours`, the
activity will be executed immediately after the trigger type occurs (at the next scheduled run of
the :ref:`Mail: Email Queue Manager cron <email_communication/email-sent-late>`).
the :ref:`Mail: Email Queue Manager cron <email-issues-outgoing-execution-time>`).
.. _marketing_automation/trigger-type:

View File

@ -254,9 +254,9 @@ Enter an alias in the :guilabel:`Email Alias` field. All documents sent to this
uploaded to the workspace using the chosen tags.
.. note::
- Your **email server** must be configured to be able to create an **email alias**. If it isn't
configured yet, click :guilabel:`Choose or Configure Email Servers` and configure the
:doc:`mail server <../../applications/general/email_communication/email_servers>`.
- You need to have an alias domain set to be able to upload documents by email. If it isn't
existing yet, click :guilabel:`Choose or Configure Email Servers` and create an
:ref:`alias domain <email-outbound-alias-domain>`.
- By default, the :guilabel:`Document Owner` is the person who uploads a file to a workspace, but
you can select another user. You can also set a :guilabel:`Contact`, usually an external
person, such as a partner.

View File

@ -13,6 +13,8 @@ First, ensure the *Leads* feature is enabled in the database by navigating to :m
app --> Configuration --> Settings`. Tick the :guilabel:`Leads` checkbox, then click
:guilabel:`Save`.
.. _crm/configure_email_alias:
Configure email aliases
=======================
@ -58,7 +60,7 @@ contact's email address.
to the database as opportunities.
.. seealso::
:doc:`../../../general/email_communication/email_servers`
:doc:`../../../general/email_communication`
Manually create leads
=====================

View File

@ -348,5 +348,5 @@ appropriate number of stars on the Kanban card, or on the ticket.
.. seealso::
- :doc:`/applications/services/helpdesk/advanced/close_tickets`
- :doc:`/applications/general/email_communication/email_servers`
- :doc:`../../../general/email_communication`
- :doc:`/applications/websites/livechat`

View File

@ -68,6 +68,8 @@ Click the task to open it. The task form includes the following fields that you
.. image:: task_creation/task-shortcuts.png
:alt: Using keyboard shortcuts to create a task in Project.
.. _task_creation/email_alias:
Creating tasks from an email alias
==================================
@ -82,8 +84,8 @@ Fill in the :guilabel:`Create tasks by sending an email to` field as follows:
- **Section of the alias before the @ symbol**: type the name of the email alias, e.g. `contact`,
`help`, `jobs`.
- **Domain**: in most cases, this is filled in by default with your
:doc:`domain <../../../general/email_communication/email_servers>`.
- **Domain**: in most cases, this is filled in by default with your :doc:`domain
<../../../general/email_communication>`.
- **Accept Emails From**: refine the senders whose emails will create tasks in the project.
.. image:: task_creation/email-configuration.png

View File

@ -23,6 +23,10 @@ developer/tutorials/getting_started/14_other_module.rst developer/tutorials/serv
developer/tutorials/getting_started/15_qwebintro.rst developer/tutorials/server_framework_101/14_qwebintro.rst
developer/tutorials/getting_started/16_final_word.rst developer/tutorials/server_framework_101/15_final_word.rst
# applications/general
applications/general/email_communication/email_servers.rst applications/general/email_communication.rst
# applications/inventory_and_mrp
applications/inventory_and_mrp/inventory/warehouses_storage/advanced_operations_warehouse/closest_location.rst applications/inventory_and_mrp/inventory/warehouses_storage/removal_strategies/closest_location.rst # advanced_operations_warehouse/* --> removal_strategies/*