Table of Contents:
-
Introduction
-
Why Email Delivery Matters in Dolibarr
-
How Email Sending Works in Dolibarr
-
Common Email Sending Problems
-
Diagnosing Email Issues in Dolibarr
-
Understanding SMTP, PHP Mail, and Other Sending Methods
-
Configuring Email Settings Correctly
-
Using Gmail, Outlook, or Custom SMTP Servers
-
Testing Email Functionality
-
Common Configuration Mistakes and How to Fix Them
-
Security Settings, Authentication, and Encryption
-
DNS Records: SPF, DKIM, and DMARC
-
How to Monitor Email Logs in Dolibarr
-
Improving Email Deliverability
-
Tools and Add-ons for Email Debugging in Dolibarr
-
Real-World Use Cases and Troubleshooting Scenarios
-
Recommendations for Hosting Providers
-
Automating Email Alerts and Notifications
-
Preventing Your Emails from Being Marked as Spam
-
Conclusion: A Reliable Email Setup is Essential
1. Introduction
Email remains a critical communication channel in any business. In Dolibarr ERP/CRM, email functionality is deeply integrated into modules such as invoices, proposals, orders, support tickets, and notifications. When email sending fails, it doesn’t just create technical noise—it disrupts business workflows and client relationships.
In this comprehensive guide, we’ll dive deep into the root causes of email problems in Dolibarr, how to fix them, how to properly configure email settings, and what best practices ensure reliable delivery.
2. Why Email Delivery Matters in Dolibarr
Dolibarr uses email to:
-
Send invoices and payment reminders
-
Share quotes and order confirmations
-
Notify users of system alerts
-
Enable communication via support modules
-
Track notifications for automated tasks
Failure in email delivery can result in missed payments, unprocessed orders, and frustrated users. This is why resolving and preventing email issues is vital for any Dolibarr installation.
3. How Email Sending Works in Dolibarr
Dolibarr supports multiple ways to send emails:
-
PHP mail() function: Uses the server’s internal mail handler
-
SMTP server: Uses an external mail server for authentication and dispatch
-
Sendmail/Postfix: Depends on system-level mail transport agents
Each method comes with its own set of configuration requirements, limitations, and error conditions.
4. Common Email Sending Problems
Typical email sending issues in Dolibarr include:
-
Emails not sent at all
-
Emails sent but never received (likely in spam folders)
-
SMTP errors such as "authentication failed" or "connection timeout"
-
Emails with missing attachments
-
Incorrect sender address or domain mismatch
5. Diagnosing Email Issues in Dolibarr
Start by narrowing down the problem:
-
Go to Home > Setup > Email
-
Send a test email to yourself
-
Enable error reporting and logs
-
Check if other users have the same issue
-
Review the Dolibarr logs located in
/dolibarr/documents/admin/system.log
Also check your server's mail logs or hosting provider logs if available.
6. Understanding SMTP, PHP Mail, and Other Sending Methods
PHP Mail:
-
Simple to set up, but lacks authentication
-
May be blocked by hosting providers
-
Not recommended for production systems
SMTP:
-
Requires proper credentials and host settings
-
More secure and traceable
-
Preferred for reliability
Sendmail/Postfix:
-
Needs server-side configuration
-
Suitable for dedicated servers with full control
7. Configuring Email Settings Correctly
Navigate to Home > Setup > Email and choose your sending method. For SMTP:
-
SMTP host: e.g., smtp.gmail.com or mail.yourdomain.com
-
Port: 587 (TLS) or 465 (SSL) or 25 (non-secure)
-
Username: your full email address
-
Password: email password or app-specific password
-
Encryption: SSL/TLS
Be sure to save settings and test the configuration.
8. Using Gmail, Outlook, or Custom SMTP Servers
Gmail:
-
Requires enabling "less secure apps" or using app-specific password
-
SMTP: smtp.gmail.com, Port: 587 (TLS)
Outlook/Office 365:
-
SMTP: smtp.office365.com
-
Requires modern authentication (OAuth2), which Dolibarr may not support without plugins
Custom SMTP:
-
Check DNS settings, SPF/DKIM
-
Ensure correct ports are open on your firewall
9. Testing Email Functionality
-
Use the test button in Email Setup
-
Send an invoice to your own email
-
Monitor response time and inbox folder (check spam/junk)
-
Use online tools like mail-tester.com to evaluate deliverability
10. Common Configuration Mistakes and How to Fix Them
-
Wrong SMTP host or port: Always confirm with your provider
-
Missing encryption setting: Use TLS or SSL based on provider specs
-
Blocked ports: Hosting providers may block 25 or 465
-
Typos in credentials: Double-check for spelling mistakes
11. Security Settings, Authentication, and Encryption
-
Always use secure passwords and avoid storing them in plain text
-
Enable TLS or SSL
-
For better security, use SMTP with authentication rather than PHP mail
12. DNS Records: SPF, DKIM, and DMARC
To improve deliverability:
-
SPF: Authorizes your server to send email for your domain
-
DKIM: Cryptographically signs your messages
-
DMARC: Tells receiving servers how to handle suspicious messages
Set these via your domain DNS panel and test with tools like MXToolbox.
13. How to Monitor Email Logs in Dolibarr
Email logs are essential to troubleshoot issues. Go to:
-
Home > Admin Tools > Logs
-
Enable logging in conf.php for deeper traces
-
Monitor server-level logs for mail delivery status
14. Improving Email Deliverability
-
Use a professional SMTP provider (Mailgun, SendGrid, etc.)
-
Avoid sending bulk emails through shared hosting
-
Include unsubscribe links in mass emails
-
Monitor blacklists and reputation scores
15. Tools and Add-ons for Email Debugging in Dolibarr
-
Dolibarr Mail Tools: Adds advanced logging and retry features
-
SMTP Tester Modules: Validate settings before sending real messages
-
External: Mailtrap, Postmark for sandbox testing
16. Real-World Use Cases and Troubleshooting Scenarios
-
Problem: Emails never received by clients Solution: SPF missing, using PHP Mail instead of SMTP
-
Problem: Test email succeeds, real messages fail Solution: Attachment size exceeded, spam filter
-
Problem: SMTP auth failed Solution: Wrong password, 2FA not supported
17. Recommendations for Hosting Providers
If you're using shared hosting:
-
Avoid PHP Mail
-
Confirm SMTP access and open ports
-
Check limits on outgoing emails
For VPS or cloud servers:
-
Install Postfix or Exim
-
Configure firewalls and DNS properly
18. Automating Email Alerts and Notifications
Modules like Agenda, Tickets, or Workflows depend on email automation:
-
Use scheduled tasks to trigger daily summaries
-
Assign notification rules per user or group
-
Test event-based triggers thoroughly
19. Preventing Your Emails from Being Marked as Spam
-
Avoid spammy subject lines and content
-
Send from a recognized domain with matching DNS records
-
Personalize where possible
-
Send opt-in communications only
20. Conclusion: A Reliable Email Setup is Essential
Email reliability in Dolibarr directly impacts business operations. By understanding the system, configuring settings properly, and using the right tools and practices, you can prevent most email delivery problems.
This guide is your foundation to not just solving email issues, but creating a robust, scalable email communication system within your Dolibarr environment. Keep testing, stay secure, and keep your clients informed—one successful email at a time.