本文档主要面向 Odoo 本地用户,这些用户无法从开箱即用的解决方案中发送和接收 Odoo 中的电子邮件中受益,这与”Odoo Online <https://www.odoo.com/试用>&’<https://www.odoo.sh>> Odoo.sh;<https://www.odoo.sh>”不同。
如果您的公司中没有人用于管理电子邮件服务器,我们强烈建议您选择 Odoo 托管解决方案。他们的电子邮件系统可以立即工作,并由专业人士监控。不过,如果您希望自己管理电子邮件服务器的声誉,您仍可以使用自己的电子邮件服务器。
您将在这里找到一些有用的信息,了解如何将您自己的电子邮件解决方案与 Odoo 集成。
注解
Office 365 电子邮件服务器不允许从 Odoo 等主机发送外部电子邮件。请参阅”微软的文档”<https://support.office.com/en-us/article/How-to-set-up-a-multifunction-device-or-application-to-send-email-using-Office-365-69f58e99-c550-4274-ad18-c805d654b4c4>`__ 使其工作。
如何管理出站邮件
以系统管理员的身份登陆后点击菜单 :menuselection:[UNKNOWN NODE problematic]设置 –> 通用设置,勾选*外部邮件服务器*(注意:只有Odoo10以上的版本才有这个复选框)。若是8.0版本请您以系统管理员的身份登陆后点击菜单 :menuselection:[UNKNOWN NODE problematic]设置 –> 常规设置,看到电子邮件四个中国汉字,的边上对应两个配置项,点击进行相关参数配置。然后进入以下步骤。
下面是 G Suite 服务器的典型配置。

然后在”常规设置”中设置您的电子邮件域名。
我可以使用 Office 365 服务器吗?
如果在本地运行 Odoo,则可以使用 Office 365 服务器。Office 365 SMTP 中继与 Odoo 在线不兼容。
请参阅”微软的文档 “https://support.office.com/en-us/文章/如何设置多功能设备或应用程序-发送电子邮件-使用 Office-365-69f58e99-c550-4274-ad18-c805d654b4c4_*,为您的 Odoo 的 IP 地址配置 SMTP 中继。
如何使用 G Suite 服务器
You can use an G Suite server for any Odoo hosting type. To do so you need to enable a SMTP relay and to allow Any addresses in the Allowed senders section. The configuration steps are explained in Google documentation.
符合 SPF 标准
如果您使用 SPF(发件人策略框架)来增加传出电子邮件的可传递性,请不要忘记在域名设置中授权 Odoo 作为发送主机。以下是 Odoo 在线的配置:
- 如果没有为 SPF 设置 TXT 记录,请创建一个具有以下定义的记录:v_spf1 包括:_spf.odoo.com _所有
- In case a SPF TXT record is already set, add “include:_spf.odoo.com”. e.g. for a domain name that sends emails via Odoo Online and via G Suite it could be: v=spf1 include:_spf.odoo.com include:_spf.google.com ~all
找到<https://www.mail-tester.com/spf/>,在你自己的域寄存器中以准确步骤创建或修改TXT记录。
新的SPF记录48小时后生效,但通常用不了那么长时间。
注解
为一个域添加多个SPF记录可能导致邮件被分类为垃圾。我们建议仅修改一个SPF记录以授权给Odoo。
Allow DKIM
You should do the same thing if DKIM (Domain Keys Identified Mail) is enabled on your email server. In the case of Odoo Online & Odoo.sh, you should add a DNS “odoo._domainkey” CNAME record to “odoo._domainkey.odoo.com”. For example, for “foo.com” they should have a record “odoo._domainkey.foo.com” that is a CNAME with the value “odoo._domainkey.odoo.com”.
How to 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 catchall alias (catchall@).
- Bounced messages are routed to bounce@ in order to track them in Odoo. This is especially used in Odoo Email Marketing to opt-out invalid recipients.
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),
- Support Channel (to create Tickets in Odoo Helpdesk),
- Projects (to create new Tasks in Odoo Project),
- Job Positions (to create Applicants in Odoo Recruitment),
- 等等
Depending on your 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 your mail server.
- Create the corresponding email addresses in your mail server (catchall@, bounce@, sales@, etc.).
Set your domain name in the General Settings.
- If you use Odoo on-premise, create an Incoming Mail Server in Odoo for each alias. You can do it from the General Settings as well. Fill out the form according to your email provider’s settings. Leave the Actions to Perform on Incoming Mails blank. Once all the information has been filled out, click on TEST & CONFIRM.

- If you use Odoo Online or Odoo.sh, We do recommend to redirect incoming messages to Odoo’s domain name rather than exclusively use your own email server. That way you will receive incoming messages without delay. Indeed, Odoo Online is fetching incoming messages of external servers once per hour only. You should set redirections for all the email addresses to Odoo’s domain name in your 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. To edit catchall and bounce aliases, you first need to activate the developer mode from the Settings Dashboard.

Then refresh your screen and go to
to customize the aliases (mail.catchall.alias & * mail.bounce.alias*).
注解
By default inbound messages are fetched every 5 minutes in Odoo on-premise. You can change this value in developer mode. Go to
and look for Mail: Fetchmail Service.