Mail Integration in Odoo

Inbound and outbound mail-integration is one of the most powerful features of the Odoo Enterprise Application Framework.

In this article we help you understand the possibilities of achieving integration of your business emails into Odoo.

Settings

Mail server integrations are managed under Settings (Debug) → Technical → Outgoing Mail Servers, Incoming Mail Servers

Outbound Mails

SMTP Server

It is possible to define an SMTP server that will be responsible to send all mails out of Odoo, for example those written from the Chatter (Send Message, Log Note etc.)


You will need the following SMTP settings in order to complete the configuration, and test the connection.

  • Domain name of the SMTP server

  • Username and Password

  • SMTP Port

Mail Server Reputation

In order to ensure that mails reach their destined recipients, it is important to use SMTP servers that have built a strong reputation over several years of operation.

A good option in current times is to utilise professional SMTP-services such as Gmail, SendinBlue, Mailgun, smtp.com et. al..

Inbound Mails

Inbound mail-services are a tad more complicated than outbound to understand and implement, in large part due to the variety of situations they can be integrated within business processes.

Some of the scenarios that inbound mails can be integrate into business-processes are:

  • Inbound email converted automatically into a sales lead/opportunity.

  • Support emails converted automatically into Helpdesk tickets for B2C businesses. For B2B companies, incoming emails can be associated to specific projects.

  • All incoming invoices by email can be automatically converted into Vendor Bills.

  • Job applicants can be captured under a single advertised email.

  • etc..

IMAP Server

Although Odoo's internal mail libraries are able to retrieve mails from both POP3 and IMAP servers, we utilise IMAP on a standard basis, choosing to keep a copy of the mail on the server.

As with SMTP above, you will need the following credentials for authenticating with IMAP.

  • Domain name of the IMAP server

  • Username and Password of the specific mailbox you will be connecting to Odoo. Multiple mailboxes can be connected, which is a recommended practice.

  • IMAP Port

If your IMAP server supports TLS/SSL, which is the case with an increasing number of professional IMAP providers, and highly recommended. 

While configuring Inbound Mail Settings on your Odoo instance, you will find an important setting called Actions to Perform on Incoming Mails → Create New Record. This is an important feature of Odoo, which we will explain below.

Department Mailboxes

There are a number of powerful ways Odoo's Inbound Mail Integration can be configured. One of them is by dedicating a single mailbox to every department. The usual departments are:

  • sales@ – all mails going into this mailbox can be converted into Opportunities/Pipeline. This is one way of integrating web-forms with Odoo.

  • accounts@ – Inbound invoices by email, as well as mails pertaining to payments can be directed into this mailbox.

  • purchase@ – If your organisation manages a number of vendors, this mailbox can be use to receive quotations, and responses to your Purchase Orders (POs).

  • Customer Support@ / Helpdesk@ – This is a centralised mailbox for pooling all customer support correspondence.

  • projects@ – If your organisation does a number of projects, especially for customers (external projects, as opposed to internal projects), then you can set up aliases for each project, such as prj1@example.com, prj2@example.com etc. See Aliases below.

  • etc..

Aliases

You can dedicate one mailbox, say projects@example.com, to pool all your customer/partner/external-projects related mails. For each project, configure an alias on your mailserver, example prj1, on the projects@ mailbox, which corresponds to Project-1.

All new inbound mails sent to prj1@ address will be converted into new Tasks in Project-1. If the inbound mail is a reply to a Message sent from the Chatter of an existing Task, it will be appended to the respective Task.

X-Odoo-Objects

The X-Odoo-Objects mail header is the routing token used to attach a particular email fetched from an IMAP mailbox to a specific Odoo document.

Chatter and New Objects

Inbound mails can primarily perform 2 actions:

  1. Handle replies to Messages sent from the Chatter of various Odoo documents.

  2. Create New Record – An incoming mail can trigger the creation of a new Odoo record, for ex. a Sales Opportunity, or a Vendor Bill.



For assistance with implementing mail integration with your business processes using Odoo, please contact us at +4971179472394, or via our contact form.

Start writing here...

Transfer Odoo.sh Licenses to Independent Server