Module SimpleSenderSMTP

Informations

Module name SimpleSenderSMTP
Editor / Editeur JiminiWikid
Download or buy page DoliStore
Status / Statut Stable
Prerequisites / Prerequis Dolibarr 16.0+, PHP 7.1+
Last update date 2026-08-27

SimpleSenderSMTP lets you define per-sender SMTP credentials so outgoing emails route through different SMTP servers based on the From address.

Description

English

On shared hosting, the mail server often enforces sender login restrictions. This means you cannot send as multiple domains through a single SMTP account. SimpleSenderSMTP solves this by letting you create SMTP profiles for each sender address. When a profile matches the From address of an outgoing email, Dolibarr uses that profile's SMTP credentials instead of the global configuration.

This is especially useful when your Dolibarr instance handles emails for several domains (e.g. sales@companyA.com and info@companyB.com) on a shared hosting environment where each sender must authenticate with its own mailbox.

Francais

Sur un hebergement mutualise, le serveur de messagerie impose souvent des restrictions de connexion par expediteur. Cela empeche l'envoi depuis plusieurs domaines via un seul compte SMTP. SimpleSenderSMTP resout ce probleme en vous permettant de creer des profils SMTP pour chaque adresse d'expedition. Lorsqu'un profil correspond a l'adresse From d'un email sortant, Dolibarr utilise les identifiants SMTP de ce profil au lieu de la configuration globale.

Ceci est particulierement utile lorsque votre instance Dolibarr gere les emails de plusieurs domaines (par ex. ventes@societeA.com et info@societeB.com) sur un hebergement mutualise ou chaque expediteur doit s'authentifier avec sa propre boite mail.

Espanol

En alojamientos compartidos, el servidor de correo suele imponer restricciones de inicio de sesion por remitente. Esto impide el envio desde varios dominios a traves de una sola cuenta SMTP. SimpleSenderSMTP resuelve este problema permitiendo crear perfiles SMTP para cada direccion de envio. Cuando un perfil coincide con la direccion From de un correo saliente, Dolibarr utiliza las credenciales SMTP de ese perfil en lugar de la configuracion global.

Esto es especialmente util cuando su instancia de Dolibarr gestiona correos de varios dominios (p. ej. ventas@empresaA.com e info@empresaB.com) en un alojamiento compartido donde cada remitente debe autenticarse con su propio buzon.

Features

  • Define unlimited SMTP profiles, each tied to a sender email address
  • Per-profile SMTP server, port, username, password, SSL/STARTTLS settings
  • Enable or disable individual profiles without deleting them
  • Passwords stored securely using Dolibarr's dolEncrypt()
  • Built-in test email feature to verify each profile works
  • Hooks into Dolibarr's mail system transparently (no core file modifications)
  • Works in both htdocs/custom/ and htdocs/ module directories
  • Multilingual: English, French, Spanish

Screenshots

The admin page lets you add, edit and delete SMTP profiles. Each profile maps a sender email address to its own SMTP server credentials. The profiles table shows all configured senders at a glance with their status, SSL and STARTTLS settings.

Installation

  1. Download the module zip from DoliStore
  2. In Dolibarr, go to Home > Setup > Modules/Applications
  3. Click Deploy/install an external app/module and upload the zip
  4. Enable the module SimpleSenderSMTP in the module list
  5. Go to Setup > SimpleSenderSMTP to add your SMTP profiles

How It Works

SimpleSenderSMTP uses Dolibarr's hook system (context: mail) to intercept outgoing emails. Before an email is sent, the module checks whether the From address matches any active SMTP profile. If a match is found, it overrides the global SMTP settings with the profile's credentials for that single send. No core Dolibarr files are modified.

Changelog

Version 1.1.0 (2026-08-27)

  • Multilingual support (EN, FR, ES)
  • GPL v3 licence file
  • Dolistore packaging and validation compliance
  • Full modulebuilder-compatible main.inc.php loading

Version 1.0.1

  • Fixed password decryption using dolDecrypt() in hook class

Version 1.0.0

  • Initial release
  • Per-sender SMTP profile management
  • Admin setup page with add/edit/delete
  • sendMail hook for credential override
  • SSL, STARTTLS, and active/inactive toggle per profile

License

GPL v3 or later. See GNU GPL v3.