Configuration
The module configuration is found in Tools > Capmail, then click the gear icon, or access it via Home > Setup > Modules > Capmail > Gear. The administration page is organized in four main tabs and several secondary tabs.
Main tabs
| Tab | Description | Dedicated page |
|---|---|---|
| Mailboxes | IMAP/SMTP accounts, folders, sending address. Mandatory entry point. | Mailboxes |
| Behavior | General settings: menu, IMAP archiving, exclusions, HTML editor, default sending mailbox. | Behavior |
| Leads and third parties | Default values for creating third parties and projects, automatic reply, status colors. | Leads and third parties |
| Advanced | Custom flags, extra fields, column order, maintenance tools. | Advanced |
Secondary tabs
| Tab | Description | Dedicated page |
|---|---|---|
| Extraction templates | Automatic form detection (Contact Form 7, Wix, etc.) and data extraction. | Templates |
| Labels | Shared and personal Capmail labels to classify emails. | Labels |
| Email domains | Servers and folders of the company domains: a user of these domains only has to enter their address and password. | Mailboxes |
| Mailbox access rights | User x mailbox matrix (read/send). | Permissions |
| About | Information about the module version. | -- |

First-time setup
As long as no mailbox is created, the main interface displays an onboarding page inviting the administrator to create the first mailbox. The standard workflow is:
- Create a mailbox ("Mailboxes" tab, New mailbox button) and test the IMAP connection.
- Configure the SMTP on the same card to be able to send replies (optional: otherwise the global Dolibarr SMTP is used).
- Give access rights to the relevant users ("Mailbox access rights" tab).
- Adjust the general behavior (sender exclusions, IMAP archiving, etc.) in the "Behavior" tab.
- If you process web form emails, create extraction templates to pre-fill third party cards automatically.
Personal mailbox
Each user can configure their own IMAP mailbox directly from the leads interface, by clicking the gear icon in the toolbar.
Prerequisite
The administrator must first grant the "Use a personal mailbox" permission to the user concerned (see Permissions).
Adding your mailbox: the address is usually enough
At the top of the form, enter your email address then click Detect servers. Capmail fills in the IMAP and SMTP servers:
- if the address belongs to a company domain declared by the administrator, its servers and folders are used as they are;
- if it is a known provider (Gmail, Free, Orange, SFR, La Poste, OVHcloud, IONOS, Gandi, Infomaniak, Yahoo, iCloud, GMX...), including a company domain hosted by one of them, its servers are suggested;
- otherwise, Capmail queries the DNS records of the domain, then tries
imap.andmail.followed by the domain, and keeps them only if the server answers.
In the first two cases, the server settings collapse: only the password remains to be entered. The Show server settings link expands them again. A message reports special cases: app password required (Gmail, Yahoo, iCloud), or provider refusing the password (Microsoft 365).
No information is sent to an external directory: only the DNS of the domain and, as a last resort, the presumed server are queried.

Privacy
Emails fetched via a personal mailbox are private by default: only the mailbox owner can see them. When a private email is linked to a Dolibarr third party, the user has the option to share it with the team, which makes it visible to other users who have access to the third party.
Connection settings
The personal mailbox configuration form contains the following fields:
| Parameter | Description |
|---|---|
| IMAP server | Address of the IMAP server (e.g. imap.gmail.com) |
| Port | Connection port (993 for SSL, 143 for STARTTLS) |
| Encryption | Security type: SSL, TLS or STARTTLS |
| Login | Username or email address of the account |
| Password | IMAP account password |
| Folders | Configuration of the IMAP folders (Inbox, Sent, Trash, Spam, Archives, Drafts) |
SMTP configuration (optional)
It is possible to configure an SMTP server associated with the personal mailbox to send emails directly from that mailbox. If SMTP is not configured, replies use the global Dolibarr SMTP configuration.
Private and Personal
Two close notions not to be confused:
- the Private badge only means that the email comes from a personal mailbox and is visible to its owner only. All the emails of a personal mailbox are private, work emails included;
- the Personal system label is applied by the owner of the mailbox, email by email, to what belongs to their private life. Only the owner can apply it, and only to an email of their own personal mailbox (see Mark an email as personal).
It is the Personal label, not the Private badge, that decides what is deleted by the purge and after the employee leaves.
Purging personal emails
At the bottom of the personal mailbox card (My mailboxes page), the Purge personal mails section deletes the emails of the mailbox tagged Personal, and only them. The other emails of the mailbox, whether shared with the team or not, are kept: they are company documents. An email tagged Personal is deleted even if it was shared.
The section shows two counters: the emails tagged Personal, which will be deleted, and the other emails, which will be kept. The confirmation asks you to type PURGE. Only the owner of the mailbox can run this purge, and it is irreversible.
When an administrator disables or deletes the owner's account, their personal mailboxes are disabled and the same deletion happens automatically once the delay has elapsed (30 days by default, adjustable in the Behavior tab). If the account is enabled again before the end of the delay, the deletion is cancelled; the mailboxes stay disabled until the administrator enables them again.
The GDPR does not require erasing the name of a departed employee from archived business exchanges. It asks to let them retrieve and then delete their personal messages, and to set a retention period: this is what the Personal label, this purge and the deletion delay make possible. This information does not constitute legal advice.
Automatic IMAP folder creation
When a mailbox contains only the INBOX folder (frequent with newly created accounts), Capmail automatically detects this situation and offers to create the standard IMAP folders:
- Sent
- Trash
- Junk
- Archives
- Drafts
A dedicated button appears on the configuration page of the relevant mailbox. The folders are created directly on the IMAP server and immediately available in the interface.
Scheduled task
Module activation automatically registers a scheduled task (cron job) that collects emails every 2 hours. You can adjust the frequency in Home > Setup > Scheduled tasks by editing the "Capmail" job. The Refresh button of the email list also launches an immediate collection on demand.
A second task, Capmail - send scheduled emails, sends every five minutes the emails that users have scheduled (see Send an email later). Like the collection, it only takes effect if the Dolibarr Scheduled tasks module is enabled and run regularly by the server.