strapi-plugin-magic-mail 3.0.4 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +13 -200
- package/dist/admin/{App-DkyWmEgv.mjs → App-Bmav09Ol.mjs} +77 -928
- package/dist/admin/{App-D3TchJYB.js → App-mX8QtU1Q.js} +75 -926
- package/dist/admin/{PluginSettings-DTqdZ-nW.mjs → PluginSettings-D5F5y7n2.mjs} +5 -5
- package/dist/admin/{PluginSettings-B6TdA1qd.js → PluginSettings-DE2PMxlS.js} +5 -5
- package/dist/admin/{de-SKsLY2de.mjs → de-BXyjQhJQ.mjs} +1 -21
- package/dist/admin/{de-DKEFnBGC.js → de-VtWzTjWV.js} +1 -21
- package/dist/admin/{en-CvtZE1HH.js → en-DL_aZYfg.js} +1 -21
- package/dist/admin/{en-Ds2Q7fue.mjs → en-DMdnprlB.mjs} +1 -21
- package/dist/admin/{es-BbLLes3D.js → es-BJ1KgkMA.js} +1 -21
- package/dist/admin/{es-BEvzLtTg.mjs → es-g3CHX4iu.mjs} +1 -21
- package/dist/admin/{fr-nH9uN6s9.js → fr-Bmh5-45j.js} +1 -21
- package/dist/admin/{fr-CRpwImX6.mjs → fr-CN1X3dM-.mjs} +1 -21
- package/dist/admin/index.js +3 -3
- package/dist/admin/index.mjs +3 -3
- package/dist/admin/{pt-qt_48NxL.js → pt-DJ6GNCKb.js} +1 -21
- package/dist/admin/{pt-CjOe2N_n.mjs → pt-m8_Gnsqe.mjs} +1 -21
- package/dist/server/index.js +116 -1244
- package/dist/server/index.mjs +116 -1244
- package/package.json +31 -36
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [3.1.0](https://github.com/Schero94/Magic-Mail/compare/v3.0.4...v3.1.0) (2026-10-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* align CI installs with lockfile settings ([657f8cb](https://github.com/Schero94/Magic-Mail/commit/657f8cb8f6ef9b0e35e6c3d52a987c4186d90984))
|
|
7
|
+
* keep Magic-Mail tabs in sync with URL ([e3522a6](https://github.com/Schero94/Magic-Mail/commit/e3522a64606bca39065260556d03e56449ae8a2f))
|
|
8
|
+
* make release failure notices tolerant of missing labels ([2b2403e](https://github.com/Schero94/Magic-Mail/commit/2b2403e3ad9c30b668b1b6f804373e31af682cee))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* make Magic-Mail email-only and harden delivery ([906c813](https://github.com/Schero94/Magic-Mail/commit/906c8133e18e54608ba2b621daf4040f579aaa2d))
|
|
14
|
+
|
|
1
15
|
## [3.0.4](https://github.com/Schero94/Magic-Mail/compare/v3.0.3...v3.0.4) (2026-07-11)
|
|
2
16
|
|
|
3
17
|
|
package/README.md
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
# 📧 MagicMail - Email Business Suite for Strapi v5
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Project site: https://schero94.github.io/Magic-Mail/
|
|
4
|
+
|
|
5
|
+
> Manage email accounts, routing rules, OAuth setup, and delivery in Strapi. The plugin is MIT-licensed and open source.
|
|
4
6
|
|
|
5
7
|
[](https://www.npmjs.com/package/strapi-plugin-magic-mail)
|
|
6
8
|
[](LICENSE)
|
|
7
|
-
[](https://strapi.io)
|
|
8
10
|
|
|
9
|
-
>
|
|
11
|
+
> The plugin does not require a license key or paid plan.
|
|
10
12
|
|
|
11
13
|
---
|
|
12
14
|
|
|
@@ -15,11 +17,9 @@
|
|
|
15
17
|
**Stop fighting with .env files and email configuration!** MagicMail brings professional email management to Strapi v5 with:
|
|
16
18
|
|
|
17
19
|
- **100% Free & Open Source** - Every feature included, no license key, tiers, or limits (MIT)
|
|
18
|
-
- **
|
|
19
|
-
- **WhatsApp Messaging** - Send messages via WhatsApp (FREE!)
|
|
20
|
+
- **7 Email Providers** - Gmail, Microsoft 365, Yahoo, SMTP, SendGrid, Mailgun, Nodemailer
|
|
20
21
|
- **OAuth 2.0 Authentication** - No passwords needed for Gmail, Microsoft, Yahoo
|
|
21
22
|
- **Smart Routing Rules** - Route emails by type, recipient, subject, or custom conditions
|
|
22
|
-
- **WhatsApp Fallback** - Auto-send via WhatsApp if email fails
|
|
23
23
|
- **Automatic Failover** - Never lose an email when rate limits hit
|
|
24
24
|
- **Beautiful Admin UI** - Manage everything from Strapi Admin Panel
|
|
25
25
|
- **Zero Configuration** - No .env files, everything in the database
|
|
@@ -77,165 +77,13 @@
|
|
|
77
77
|
|
|
78
78
|
---
|
|
79
79
|
|
|
80
|
-
##
|
|
81
|
-
|
|
82
|
-
MagicMail now includes **FREE WhatsApp messaging** - send messages directly from your Strapi application!
|
|
83
|
-
|
|
84
|
-
### Why WhatsApp?
|
|
85
|
-
|
|
86
|
-
| Feature | Email | WhatsApp |
|
|
87
|
-
|---------|-------|----------|
|
|
88
|
-
| **Open Rate** | ~20% | ~98% |
|
|
89
|
-
| **Delivery Speed** | Minutes | Instant |
|
|
90
|
-
| **Spam Folder Risk** | High | None |
|
|
91
|
-
| **User Preference** | Declining | Growing |
|
|
92
|
-
| **Cost** | Varies | FREE |
|
|
93
|
-
|
|
94
|
-
### Quick Setup (4 Steps)
|
|
95
|
-
|
|
96
|
-
1. **Navigate** to Admin Panel -> MagicMail -> WhatsApp
|
|
97
|
-
2. **Connect** - Scan QR code with WhatsApp mobile app
|
|
98
|
-
3. **Verify** - Check connection status shows "Connected"
|
|
99
|
-
4. **Send** - Start sending messages programmatically!
|
|
100
|
-
|
|
101
|
-
### Sending WhatsApp Messages
|
|
102
|
-
|
|
103
|
-
**Method 1: Direct WhatsApp Send**
|
|
104
|
-
|
|
105
|
-
```javascript
|
|
106
|
-
// Send WhatsApp message directly
|
|
107
|
-
await strapi.plugin('magic-mail').service('whatsapp').sendMessage(
|
|
108
|
-
'+491234567890', // Phone number with country code
|
|
109
|
-
'Hello! This is a test message from MagicMail.'
|
|
110
|
-
);
|
|
111
|
-
```
|
|
80
|
+
## Messaging migration
|
|
112
81
|
|
|
113
|
-
|
|
82
|
+
Magic-Mail now handles email only. Install and configure the separate Magic-WhatsApp plugin for WhatsApp transport, connection state, templates, and message actions. Magic-Mail does not proxy its old routes to another plugin.
|
|
114
83
|
|
|
115
|
-
|
|
116
|
-
// Send via unified API - auto-detects channel
|
|
117
|
-
await strapi.plugin('magic-mail').service('email-router').sendMessage({
|
|
118
|
-
channel: 'whatsapp', // or 'email' or 'auto'
|
|
119
|
-
phoneNumber: '+491234567890',
|
|
120
|
-
message: 'Your order #12345 has been shipped!'
|
|
121
|
-
});
|
|
84
|
+
The `/api/magic-mail/send` endpoint is unchanged. `/api/magic-mail/send-message` still sends email and accepts `channel: "email"` or `channel: "auto"` when `to` contains the recipient address. The old `/send-whatsapp` and `/whatsapp/*` routes are removed. The `email-router` service no longer exposes WhatsApp methods, and email routing rules no longer offer WhatsApp fallback.
|
|
122
85
|
|
|
123
|
-
|
|
124
|
-
await strapi.plugin('magic-mail').service('email-router').sendMessage({
|
|
125
|
-
channel: 'auto',
|
|
126
|
-
phoneNumber: '+491234567890', // Has phone -> WhatsApp
|
|
127
|
-
message: 'Shipping notification'
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
await strapi.plugin('magic-mail').service('email-router').sendMessage({
|
|
131
|
-
channel: 'auto',
|
|
132
|
-
to: 'user@example.com', // Has email -> Email
|
|
133
|
-
subject: 'Shipping Notification',
|
|
134
|
-
message: 'Your order has been shipped!'
|
|
135
|
-
});
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
**Method 3: REST API**
|
|
139
|
-
|
|
140
|
-
```javascript
|
|
141
|
-
// POST /api/magic-mail/send-whatsapp
|
|
142
|
-
await fetch('/api/magic-mail/send-whatsapp', {
|
|
143
|
-
method: 'POST',
|
|
144
|
-
headers: {
|
|
145
|
-
'Content-Type': 'application/json',
|
|
146
|
-
'Authorization': 'Bearer YOUR_STRAPI_API_TOKEN'
|
|
147
|
-
},
|
|
148
|
-
body: JSON.stringify({
|
|
149
|
-
phoneNumber: '+491234567890',
|
|
150
|
-
message: 'Hello from MagicMail!'
|
|
151
|
-
})
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
// POST /api/magic-mail/send-message (unified)
|
|
155
|
-
await fetch('/api/magic-mail/send-message', {
|
|
156
|
-
method: 'POST',
|
|
157
|
-
headers: {
|
|
158
|
-
'Content-Type': 'application/json',
|
|
159
|
-
'Authorization': 'Bearer YOUR_STRAPI_API_TOKEN'
|
|
160
|
-
},
|
|
161
|
-
body: JSON.stringify({
|
|
162
|
-
channel: 'whatsapp',
|
|
163
|
-
phoneNumber: '+491234567890',
|
|
164
|
-
message: 'Order confirmed!'
|
|
165
|
-
})
|
|
166
|
-
});
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
### WhatsApp Use Cases
|
|
170
|
-
|
|
171
|
-
**1. Email Fallback**
|
|
172
|
-
If email delivery fails, automatically send via WhatsApp:
|
|
173
|
-
|
|
174
|
-
```javascript
|
|
175
|
-
// In Routing Rules, enable "WhatsApp Fallback"
|
|
176
|
-
// Set "WhatsApp Phone Field" to 'phoneNumber'
|
|
177
|
-
|
|
178
|
-
await strapi.plugin('magic-mail').service('email-router').send({
|
|
179
|
-
to: 'user@example.com',
|
|
180
|
-
phoneNumber: '+491234567890', // Fallback phone
|
|
181
|
-
subject: 'Important Update',
|
|
182
|
-
html: '<h1>Update</h1>',
|
|
183
|
-
type: 'transactional'
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
// If email fails -> auto-sends via WhatsApp!
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
**2. Admin Notifications**
|
|
190
|
-
Get instant WhatsApp alerts for critical events:
|
|
191
|
-
|
|
192
|
-
```javascript
|
|
193
|
-
// Example: Notify admin when email quota exceeded
|
|
194
|
-
const adminPhone = '+4917612345678';
|
|
195
|
-
|
|
196
|
-
await strapi.plugin('magic-mail').service('whatsapp').sendMessage(
|
|
197
|
-
adminPhone,
|
|
198
|
-
'[ALERT] Email quota exceeded for SendGrid account!'
|
|
199
|
-
);
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
**3. Urgent Transactional Messages**
|
|
203
|
-
Send time-sensitive messages instantly:
|
|
204
|
-
|
|
205
|
-
```javascript
|
|
206
|
-
// OTP/Verification codes
|
|
207
|
-
await strapi.plugin('magic-mail').service('whatsapp').sendMessage(
|
|
208
|
-
userPhone,
|
|
209
|
-
`Your verification code: 123456\n\nValid for 5 minutes.`
|
|
210
|
-
);
|
|
211
|
-
|
|
212
|
-
// Order updates
|
|
213
|
-
await strapi.plugin('magic-mail').service('whatsapp').sendMessage(
|
|
214
|
-
customerPhone,
|
|
215
|
-
`Order #${orderId} is out for delivery!\nTrack: ${trackingUrl}`
|
|
216
|
-
);
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
### WhatsApp Status API
|
|
220
|
-
|
|
221
|
-
```javascript
|
|
222
|
-
// Check connection status
|
|
223
|
-
const status = await strapi.plugin('magic-mail').service('whatsapp').getStatus();
|
|
224
|
-
// { isConnected: true, phoneNumber: '+49...', name: 'Business Account' }
|
|
225
|
-
|
|
226
|
-
// Check if phone number is on WhatsApp
|
|
227
|
-
const exists = await strapi.plugin('magic-mail').service('whatsapp').checkNumber('+491234567890');
|
|
228
|
-
// { exists: true, jid: '491234567890@s.whatsapp.net' }
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
### Integration with Magic-Link Plugin
|
|
232
|
-
|
|
233
|
-
When both **MagicMail** and **Magic-Link** are installed:
|
|
234
|
-
|
|
235
|
-
- Magic-Link automatically uses MagicMail's WhatsApp service
|
|
236
|
-
- Only ONE WhatsApp connection needed (managed here in MagicMail)
|
|
237
|
-
- Send magic links via WhatsApp from Magic-Link settings
|
|
238
|
-
- Unified WhatsApp management for all plugins
|
|
86
|
+
Magic-Mail does not delete or import old local session files, stored templates, or settings. The two legacy routing-rule columns remain in Strapi's schema so schema synchronization does not drop their saved values. The plugin no longer reads or updates those fields. Back up existing session data securely and migrate it only by following the separate Magic-WhatsApp plugin's instructions.
|
|
239
87
|
|
|
240
88
|
---
|
|
241
89
|
|
|
@@ -243,7 +91,7 @@ When both **MagicMail** and **Magic-Link** are installed:
|
|
|
243
91
|
|
|
244
92
|
### Installation
|
|
245
93
|
|
|
246
|
-
Requires Node.js 20.19
|
|
94
|
+
Requires Node.js `>=20.19.0 <=26.x.x` and Strapi `^5.57.0`.
|
|
247
95
|
|
|
248
96
|
```bash
|
|
249
97
|
npm install strapi-plugin-magic-mail
|
|
@@ -1595,44 +1443,9 @@ If MagicMail helps your project, please:
|
|
|
1595
1443
|
|
|
1596
1444
|
---
|
|
1597
1445
|
|
|
1598
|
-
##
|
|
1599
|
-
|
|
1600
|
-
MagicMail's direct dependencies are audited on every release, but two
|
|
1601
|
-
transitive paths are governed by upstream packages we do not control.
|
|
1602
|
-
If your own `npm audit` flags either of them, add the matching entry
|
|
1603
|
-
to your **Strapi project's** `package.json` (not this plugin's — npm
|
|
1604
|
-
`overrides` only take effect on the root project):
|
|
1605
|
-
|
|
1606
|
-
```jsonc
|
|
1607
|
-
{
|
|
1608
|
-
"overrides": {
|
|
1609
|
-
// GHSA-xq3m-2v4x-88gg — protobufjs <7.5.5 arbitrary code execution.
|
|
1610
|
-
// Reaches us via baileys → libsignal → protobufjs. We already ship
|
|
1611
|
-
// this override for local plugin development; apply it in your
|
|
1612
|
-
// Strapi project so the fix propagates to the installed tree.
|
|
1613
|
-
"protobufjs": "^7.5.5"
|
|
1614
|
-
}
|
|
1615
|
-
}
|
|
1616
|
-
```
|
|
1617
|
-
|
|
1618
|
-
After editing `package.json`, run:
|
|
1619
|
-
|
|
1620
|
-
```bash
|
|
1621
|
-
rm -rf node_modules package-lock.json
|
|
1622
|
-
npm install
|
|
1623
|
-
npm audit
|
|
1624
|
-
```
|
|
1625
|
-
|
|
1626
|
-
The critical `protobufjs` advisory disappears once the override is in
|
|
1627
|
-
place. Remaining `@strapi/design-system → lodash` advisories are
|
|
1628
|
-
Strapi-core issues and will clear up automatically when you upgrade
|
|
1629
|
-
`@strapi/strapi` to the latest patch release.
|
|
1446
|
+
## Dependency audits
|
|
1630
1447
|
|
|
1631
|
-
|
|
1632
|
-
install without the Baileys optional paths via
|
|
1633
|
-
`npm install strapi-plugin-magic-mail --ignore-scripts` — the plugin
|
|
1634
|
-
already guards every Baileys import with a try/catch and will log
|
|
1635
|
-
"WhatsApp features disabled" rather than crash.
|
|
1448
|
+
Run `npm audit` from the Strapi project root to check the complete installed dependency tree. npm applies dependency overrides from the root project manifest, not from this plugin's manifest.
|
|
1636
1449
|
|
|
1637
1450
|
---
|
|
1638
1451
|
|