Email CC and BCC
Real CC, BCC and Reply-To management for every email sent from Dolibarr.
Standard Dolibarr shows a CC field on some email forms only, hides the BCC field behind a global option and offers no Reply-To at all. Nothing is kept of the blind copies once the message is gone, and there is no way to say « every invoice must also go to the accounting department ». Email CC and BCC turns those three fields into first class citizens of every email form of Dolibarr, lets you type any address, fills the usual recipients in automatically and keeps a complete trace of what was sent, to whom, and in copy of whom.
Why you need it
- Keep everyone in the loop. The sales manager on the proposals, the accounting department on the invoices, the logistics team on the orders: each of them receives their copy without anyone having to think about it.
- Prove what you sent. Every message is recorded with its date, its sender, its subject, its recipients, its CC, its BCC, its Reply-To and its status, and the same information is written in the event of the document.
- Archive reliably. A rule marked as imposed is re-applied on the server at the moment of the sending, so an archiving mailbox in blind copy cannot be removed by a user, even from the browser.
- Answer to the right mailbox. A real Reply-To means the answers of your customers reach the shared support or accounting mailbox instead of the personal address of the agent who happened to press Send.
- No developer required. Everything is set up from the interface: global addresses, rules by document type, personal preferences.
Main features
CC and BCC everywhere
The two fields are added to every email form of Dolibarr: proposals, orders, invoices, supplier documents, shipments, contracts, interventions, projects, tickets, members, users, third parties and mass emailing.
Any address
Free email addresses, with or without a display name, separated by a comma or a semicolon. The contacts of the third party stay available in the standard selection list.
Reply-To that works
An editable Reply-To is added to the form and really applied to the message, whatever the sending mode of Dolibarr is: PHP mail, SMTP or Swift Mailer.
Default addresses
A global CC, a global BCC and a global Reply-To are filled in automatically as soon as the message is composed.
Rules
Refine the defaults by type of document, by sending context, by third party and by user, with a priority and an optional stop on match.
Imposed addresses
A rule can be marked as forced: its addresses are added again on the server when the message leaves, even if they were deleted in the browser.
Personal preferences
Each user adds their own CC and BCC, chooses their Reply-To, asks for a blind copy of everything they send and, if allowed, ignores the rules.
Information in the thread
The CC, the BCC and the Reply-To are written in the agenda event created after the sending, so the whole correspondence can be read from the document.
Log of the emails
A full list with filters, a detail page, a dashboard widget and two export profiles. A scheduled job purges the entries after the retention delay.
How it works
The module does not patch any file of Dolibarr. It plugs into four official hooks and one trigger, which is what makes it safe to install on a production instance and to remove again.
| Hook | Role |
|---|---|
getFormMail |
Shows the CC and BCC fields on every email form and fills the default addresses. |
initSendToSocid |
Applies the imposed addresses on the server, before the message is built. |
sendMail |
Applies the Reply-To, checks the addresses and keeps the data of the sending. |
sendMailAfter |
Writes the entry of the log. |
ACTION_CREATE (trigger) |
Completes the agenda event with the CC, the BCC and the Reply-To. |
Setup
The setup page is reached from the module list, or from Tools > Email CC/BCC. It is split in three sections.
| Section | What it holds |
|---|---|
| Fields shown on the forms | CC, BCC, Reply-To, folded display while the fields are empty, autocompletion of the known addresses. |
| Default addresses | Global CC, BCC and Reply-To, automatic filling, systematic blind copy of the sender. |
| Control and tracking | Information written in the event, log, retention delay, address validation, maximum number of CC plus BCC recipients. |
The Rules tab holds the default addresses by type of document, and the Demonstration data tab installs eight ready-made rules and ten log entries so that the whole module can be tried out without touching your real data.
An example of rules
| Rule | Applies to | CC | BCC | Reply-To |
|---|---|---|---|---|
| Legal archiving | All the documents (imposed) | archive@example.com | ||
| Invoices | Customer invoices | accounting@example.com | invoices-archive@example.com | accounting@example.com |
| Proposals | Commercial proposals | sales.manager@example.com | ||
| Support | Ticket context | support-archive@example.com | support@example.com |
Permissions
| Permission | What it allows |
|---|---|
| Use the CC, BCC and Reply-To fields | See and fill the fields on the email forms. |
| Read the log | See one's own sent emails. |
| Read the log of all the users | See the emails sent by everybody. |
| Delete entries from the log | Remove an entry from the log. |
| Setup the module and manage the rules | Reach the setup pages and the rules. |
Technical information
| Technical name | emailccbcc |
|---|---|
| Family | DoliMarketPlace |
| Dolibarr | 16.0 and above (tested on 22.0.2) |
| PHP | 7.4 and above (tested on 8.2) |
| Required modules | None |
| Tables created |
llx_emailccbcc_rule, llx_emailccbcc_userpref, llx_emailccbcc_log
|
| Languages | 116 language files |
| Multi-company | Supported, the rules and the log are per entity |
| License | GNU GPL v3 or later |
