Module PostmarkApp: Difference between revisions
(Création du module PostmarkApp) Tag: 2017 source edit |
(init) |
||
| Line 1: | Line 1: | ||
= | {{Dolibarr module | ||
|name=PostmarkApp | |||
|logo= | |||
|developer=Alex BORDARAUD - Lysis | |||
|contact=alex@lysis.net | |||
|website=https://lysis.net | |||
|dolistore= | |||
|version=1.5.2 | |||
: | |dolibarr_min=19.0 | ||
|dolibarr_max= | |||
|license=GPLv3 | |||
|language=Multi (FR, EN, DE, ES, IT, PT, NL) | |||
}} | |||
'''PostmarkApp''' is a Dolibarr module that replaces the native email sending system with [https://postmarkapp.com Postmark], a professional transactional email service. | |||
== | ==Why use PostmarkApp?== | ||
===English=== | |||
'''Legal proof and dispute resolution''': Having precise tracking of email delivery, opening, and link clicks provides valuable evidence in case of disputes. You can prove that: | |||
* | *An invoice or quote was successfully delivered to your client | ||
*The recipient opened the email and read it | |||
*They clicked on links (payment, validation, etc.) | |||
This traceability is essential for businesses that need to demonstrate that important information was transmitted and received. | |||
===Français=== | |||
'''Preuve juridique et résolution de litiges'''<span> </span>: Disposer d'un suivi précis de la livraison, de l'ouverture et des clics sur les liens de vos emails constitue une preuve précieuse en cas de litige. Vous pouvez prouver que<span> </span>: | |||
*Une facture ou un devis a bien été délivré à votre client | |||
*Le destinataire a ouvert l'email et l'a lu | |||
*Il a cliqué sur les liens (paiement, validation, etc.) | |||
Cette traçabilité est essentielle pour les entreprises qui doivent démontrer que des informations importantes ont été transmises et reçues. | |||
==Features== | |||
*'''Email Sending via Postmark API''' - All Dolibarr emails are sent through Postmark | |||
*'''Delivery Tracking''' - Know when your emails are delivered | |||
*'''Open Tracking''' - Track when recipients open your emails (first open only) | |||
*'''Click Tracking''' - Monitor which links are clicked in your emails | |||
*'''Bounce Handling''' - Automatically handle bounced emails | |||
*'''Spam Complaint Tracking''' - Be notified of spam complaints | |||
*'''Dolibarr Events Integration''' - All email events are logged in Dolibarr's Agenda module | |||
*'''Object Linking''' - Events are linked to related Dolibarr objects (invoices, proposals, orders, etc.) | |||
*'''Multi-language''' - Available in 7 languages (FR, EN, DE, ES, IT, PT, NL) | |||
== | ==Requirements== | ||
*Dolibarr 19.0 or higher | |||
*PHP 7.1 or higher with cURL extension | |||
*Postmark account with Server API Token | |||
*Agenda module must be enabled | |||
==Installation== | |||
#Download the module package <code>module_postmarkapp-x.y.z.zip</code> | |||
#Extract to <code>htdocs/custom/postmarkapp/</code> or use Dolibarr's module deployment feature | |||
#Go to '''Home > Setup > Modules/Applications''' | |||
#Search for "PostmarkApp" and enable the module | |||
#Configure the module in '''Setup > Modules > PostmarkApp > Settings''' | |||
==Configuration== | |||
===Step 1: Server API Token=== | |||
#Log in to your Postmark account at https://postmarkapp.com | |||
#Select your server | |||
#Go to '''API Tokens''' tab | |||
#Copy the '''Server API Token''' | |||
#Paste it in the PostmarkApp configuration page | |||
#Click '''Validate''' to test the connection | |||
=== | ===Step 2: Options=== | ||
* | *'''Message Stream''': Select the message stream to use (default: "outbound") | ||
*'''Track Opens''': Enable/disable open tracking | |||
* | *'''Track Clicks''': Enable/disable click tracking (requires HTML emails) | ||
* | *'''Replace Dolibarr Mailer''': Enable to route all emails through Postmark | ||
* | |||
===Step 3: Webhook=== | |||
=== Step | |||
3 | |||
=== | |||
Webhooks allow Postmark to notify Dolibarr of email events in real-time. | Webhooks allow Postmark to notify Dolibarr of email events in real-time. | ||
'''Automatic Setup:''' | |||
* | *Click '''Create Webhook Automatically''' | ||
*The webhook URL will be registered with Postmark | |||
'''Manual Setup:''' | |||
#Copy the webhook URL displayed in the configuration | |||
#Go to Postmark > Servers > Your Server > Webhooks | |||
#Add a new webhook with the copied URL | |||
#Enable: Delivery, Open (First Open Only), Click, Bounce, Spam Complaint | |||
== | ==How it works== | ||
Once enabled, all emails sent from Dolibarr will be routed through Postmark. The module intercepts the native email sending and replaces it with Postmark's API. | |||
When a webhook is configured, Postmark will notify your Dolibarr installation of email events: | |||
| | {| class="wikitable" | ||
| | !Event!!Description!!Dolibarr Code | ||
| | |- | ||
| | |Sent||Email sent via Postmark||POSTMARK_SENT | ||
| | |- | ||
| | |Delivered||Email delivered to recipient's server||POSTMARK_DELIVERY | ||
| | |- | ||
| | |Opened||Recipient opened the email||POSTMARK_OPEN | ||
| | |- | ||
| | |Clicked||Recipient clicked a link||POSTMARK_CLICK | ||
| | |- | ||
| | |Bounced||Email could not be delivered||POSTMARK_BOUNCE | ||
| | |- | ||
|Spam||Recipient marked as spam||POSTMARK_SPAM_COMPLAINT | |||
|} | |||
Each event creates an entry in Dolibarr's Agenda, linked to the original object. | |||
== | ==Database== | ||
The module creates one custom table: | |||
| | {| class="wikitable" | ||
| | !Column!!Type!!Description | ||
| | |- | ||
| | |rowid||INTEGER||Primary key | ||
| | |- | ||
| | |email_id||VARCHAR(255)||Postmark MessageID | ||
| | |- | ||
|event_type||VARCHAR(50)||Event type | |||
|- | |||
|recipient||VARCHAR(255)||Email recipient | |||
|- | |||
|subject||VARCHAR(255)||Email subject | |||
|- | |||
|fk_soc||INTEGER||Linked third party ID | |||
|- | |||
|fk_contact||INTEGER||Linked contact ID | |||
|- | |||
|fk_element||INTEGER||Linked element ID | |||
|- | |||
|element_type||VARCHAR(50)||Element type (propal, facture, etc.) | |||
|- | |||
|fk_actioncomm||INTEGER||Linked ActionComm ID | |||
|- | |||
|event_data||TEXT||JSON data from webhook | |||
|- | |||
|date_creation||DATETIME||Event timestamp | |||
|} | |||
==Troubleshooting== | |||
== | ===Emails not sending=== | ||
#Check that <code>POSTMARKAPP_REPLACE_MAILER</code> is enabled | |||
#Verify the Server API Token is valid | |||
#Check Dolibarr logs for error messages | |||
#Ensure the "From" address is a verified Sender Signature in Postmark | |||
===Webhooks not received=== | |||
#Verify the webhook URL is accessible from the internet | |||
#Check that webhooks are created in Postmark dashboard | |||
#Test webhooks using the built-in test buttons | |||
#Check server logs for incoming requests | |||
== | ===Click tracking not working=== | ||
= | |||
=== | |||
Click tracking requires emails to be sent in HTML format. Plain text emails cannot track clicks. | Click tracking requires emails to be sent in HTML format. Plain text emails cannot track clicks. | ||
==Screenshots== | |||
<!-- Add screenshots here --> | |||
=== | ==Changelog== | ||
===Version 1.5.2 (2026-01-06)=== | |||
*Simplified event notes and labels | |||
*Removed duplicate "Sent" event | |||
*Added bilingual documentation | |||
*Added multi-language support | |||
==Links== | |||
*[https://postmarkapp.com Postmark Official Website] | |||
*[https://lysis.net Lysis - Developer Website] | |||
- | |||
==License== | |||
This module is distributed under the [https://www.gnu.org/licenses/gpl-3.0 GNU General Public License v3 (GPLv3)]. | |||
==Professional Services / Services professionnels== | |||
=== | ===English=== | ||
'''Need help with setup?''' We can assist you with: | |||
*Installation and configuration of the PostmarkApp module | |||
*Postmark account setup and sender signature verification | |||
*Webhook configuration and testing | |||
*Integration with your existing Dolibarr workflows | |||
*Training for your team | |||
Contact us for a personalized quote. | |||
===Français=== | |||
'''Besoin d'aide pour le paramétrage ?''' Nous pouvons vous accompagner pour<span> </span>: | |||
*L'installation et la configuration du module PostmarkApp | |||
*La création de votre compte Postmark et la vérification des signatures d'expéditeur | |||
*La configuration et les tests des webhooks | |||
*L'intégration avec vos processus Dolibarr existants | |||
*La formation de vos équipes | |||
Contactez-nous pour un devis personnalisé. | |||
== | ==Author== | ||
'''Alex BORDARAUD'''<br /> | |||
Website: https://lysis.net | Website: https://lysis.net | ||
[[Category:External module]] | |||
[[Category:Communication module]] | |||
[[Category:Email module]] | |||
Revision as of 13:27, 6 January 2026
PostmarkApp is a Dolibarr module that replaces the native email sending system with Postmark, a professional transactional email service.
Why use PostmarkApp?
English
Legal proof and dispute resolution: Having precise tracking of email delivery, opening, and link clicks provides valuable evidence in case of disputes. You can prove that:
- An invoice or quote was successfully delivered to your client
- The recipient opened the email and read it
- They clicked on links (payment, validation, etc.)
This traceability is essential for businesses that need to demonstrate that important information was transmitted and received.
Français
Preuve juridique et résolution de litiges : Disposer d'un suivi précis de la livraison, de l'ouverture et des clics sur les liens de vos emails constitue une preuve précieuse en cas de litige. Vous pouvez prouver que :
- Une facture ou un devis a bien été délivré à votre client
- Le destinataire a ouvert l'email et l'a lu
- Il a cliqué sur les liens (paiement, validation, etc.)
Cette traçabilité est essentielle pour les entreprises qui doivent démontrer que des informations importantes ont été transmises et reçues.
Features
- Email Sending via Postmark API - All Dolibarr emails are sent through Postmark
- Delivery Tracking - Know when your emails are delivered
- Open Tracking - Track when recipients open your emails (first open only)
- Click Tracking - Monitor which links are clicked in your emails
- Bounce Handling - Automatically handle bounced emails
- Spam Complaint Tracking - Be notified of spam complaints
- Dolibarr Events Integration - All email events are logged in Dolibarr's Agenda module
- Object Linking - Events are linked to related Dolibarr objects (invoices, proposals, orders, etc.)
- Multi-language - Available in 7 languages (FR, EN, DE, ES, IT, PT, NL)
Requirements
- Dolibarr 19.0 or higher
- PHP 7.1 or higher with cURL extension
- Postmark account with Server API Token
- Agenda module must be enabled
Installation
- Download the module package
module_postmarkapp-x.y.z.zip - Extract to
htdocs/custom/postmarkapp/or use Dolibarr's module deployment feature - Go to Home > Setup > Modules/Applications
- Search for "PostmarkApp" and enable the module
- Configure the module in Setup > Modules > PostmarkApp > Settings
Configuration
Step 1: Server API Token
- Log in to your Postmark account at https://postmarkapp.com
- Select your server
- Go to API Tokens tab
- Copy the Server API Token
- Paste it in the PostmarkApp configuration page
- Click Validate to test the connection
Step 2: Options
- Message Stream: Select the message stream to use (default: "outbound")
- Track Opens: Enable/disable open tracking
- Track Clicks: Enable/disable click tracking (requires HTML emails)
- Replace Dolibarr Mailer: Enable to route all emails through Postmark
Step 3: Webhook
Webhooks allow Postmark to notify Dolibarr of email events in real-time.
Automatic Setup:
- Click Create Webhook Automatically
- The webhook URL will be registered with Postmark
Manual Setup:
- Copy the webhook URL displayed in the configuration
- Go to Postmark > Servers > Your Server > Webhooks
- Add a new webhook with the copied URL
- Enable: Delivery, Open (First Open Only), Click, Bounce, Spam Complaint
How it works
Once enabled, all emails sent from Dolibarr will be routed through Postmark. The module intercepts the native email sending and replaces it with Postmark's API.
When a webhook is configured, Postmark will notify your Dolibarr installation of email events:
| Event | Description | Dolibarr Code |
|---|---|---|
| Sent | Email sent via Postmark | POSTMARK_SENT |
| Delivered | Email delivered to recipient's server | POSTMARK_DELIVERY |
| Opened | Recipient opened the email | POSTMARK_OPEN |
| Clicked | Recipient clicked a link | POSTMARK_CLICK |
| Bounced | Email could not be delivered | POSTMARK_BOUNCE |
| Spam | Recipient marked as spam | POSTMARK_SPAM_COMPLAINT |
Each event creates an entry in Dolibarr's Agenda, linked to the original object.
Database
The module creates one custom table:
| Column | Type | Description |
|---|---|---|
| rowid | INTEGER | Primary key |
| email_id | VARCHAR(255) | Postmark MessageID |
| event_type | VARCHAR(50) | Event type |
| recipient | VARCHAR(255) | Email recipient |
| subject | VARCHAR(255) | Email subject |
| fk_soc | INTEGER | Linked third party ID |
| fk_contact | INTEGER | Linked contact ID |
| fk_element | INTEGER | Linked element ID |
| element_type | VARCHAR(50) | Element type (propal, facture, etc.) |
| fk_actioncomm | INTEGER | Linked ActionComm ID |
| event_data | TEXT | JSON data from webhook |
| date_creation | DATETIME | Event timestamp |
Troubleshooting
Emails not sending
- Check that
POSTMARKAPP_REPLACE_MAILERis enabled - Verify the Server API Token is valid
- Check Dolibarr logs for error messages
- Ensure the "From" address is a verified Sender Signature in Postmark
Webhooks not received
- Verify the webhook URL is accessible from the internet
- Check that webhooks are created in Postmark dashboard
- Test webhooks using the built-in test buttons
- Check server logs for incoming requests
Click tracking not working
Click tracking requires emails to be sent in HTML format. Plain text emails cannot track clicks.
Screenshots
Changelog
Version 1.5.2 (2026-01-06)
- Simplified event notes and labels
- Removed duplicate "Sent" event
- Added bilingual documentation
- Added multi-language support
Links
License
This module is distributed under the GNU General Public License v3 (GPLv3).
Professional Services / Services professionnels
English
Need help with setup? We can assist you with:
- Installation and configuration of the PostmarkApp module
- Postmark account setup and sender signature verification
- Webhook configuration and testing
- Integration with your existing Dolibarr workflows
- Training for your team
Contact us for a personalized quote.
Français
Besoin d'aide pour le paramétrage ? Nous pouvons vous accompagner pour :
- L'installation et la configuration du module PostmarkApp
- La création de votre compte Postmark et la vérification des signatures d'expéditeur
- La configuration et les tests des webhooks
- L'intégration avec vos processus Dolibarr existants
- La formation de vos équipes
Contactez-nous pour un devis personnalisé.
Author
Alex BORDARAUD
Website: https://lysis.net