strapi-plugin-magic-mail 3.0.3 → 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 +22 -0
- package/README.md +31 -217
- package/dist/admin/{App-bZGJVVWn.mjs → App-Bmav09Ol.mjs} +87 -929
- package/dist/admin/{App-pjasEbqe.js → App-mX8QtU1Q.js} +85 -927
- 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 +119 -1245
- package/dist/server/index.mjs +119 -1245
- package/package.json +31 -36
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
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
|
+
|
|
15
|
+
## [3.0.4](https://github.com/Schero94/Magic-Mail/compare/v3.0.3...v3.0.4) (2026-07-11)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **admin:** correct dark-mode navigation and free template docs ([557534f](https://github.com/Schero94/Magic-Mail/commit/557534f520cf0b562e031dc27a5c2e93485f3de9))
|
|
21
|
+
* **email:** preserve Bcc delivery for Gmail and Microsoft ([ea681ea](https://github.com/Schero94/Magic-Mail/commit/ea681ea87c04c65e69013b048646764f69c0729f))
|
|
22
|
+
|
|
1
23
|
## [3.0.3](https://github.com/Schero94/Magic-Mail/compare/v3.0.2...v3.0.3) (2026-07-11)
|
|
2
24
|
|
|
3
25
|
|
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
|
-
```
|
|
112
|
-
|
|
113
|
-
**Method 2: Unified Messaging API**
|
|
114
|
-
|
|
115
|
-
```javascript
|
|
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
|
-
});
|
|
122
|
-
|
|
123
|
-
// Auto-detect: sends WhatsApp if phoneNumber provided, email if to provided
|
|
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
|
-
```
|
|
80
|
+
## Messaging migration
|
|
201
81
|
|
|
202
|
-
|
|
203
|
-
Send time-sensitive messages instantly:
|
|
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.
|
|
204
83
|
|
|
205
|
-
|
|
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
|
-
);
|
|
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.
|
|
211
85
|
|
|
212
|
-
|
|
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
|
|
@@ -397,15 +245,16 @@ await strapi.plugin('magic-mail').service('email-router').send({
|
|
|
397
245
|
|
|
398
246
|
### ✨ Features
|
|
399
247
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
|
403
|
-
|
|
404
|
-
| **
|
|
405
|
-
| **
|
|
406
|
-
| **
|
|
407
|
-
| **
|
|
408
|
-
| **
|
|
248
|
+
Every Email Designer feature is included for free:
|
|
249
|
+
|
|
250
|
+
| Feature | Included |
|
|
251
|
+
|---------|----------|
|
|
252
|
+
| **Visual Designer** | ✅ |
|
|
253
|
+
| **Unlimited Templates** | ✅ |
|
|
254
|
+
| **Drag & Drop + Mustache** | ✅ |
|
|
255
|
+
| **Import / Export** | ✅ |
|
|
256
|
+
| **Template Versioning** | ✅ |
|
|
257
|
+
| **Email Analytics** | ✅ |
|
|
409
258
|
|
|
410
259
|
### 📧 Creating Email Templates
|
|
411
260
|
|
|
@@ -625,11 +474,11 @@ Target Account: SendGrid Marketing
|
|
|
625
474
|
Priority: 10
|
|
626
475
|
```
|
|
627
476
|
|
|
628
|
-
**2. Route VIP Customers via
|
|
477
|
+
**2. Route VIP Customers via Priority SMTP:**
|
|
629
478
|
```
|
|
630
479
|
Match Type: Recipient
|
|
631
480
|
Match Value: @vip-customers.com
|
|
632
|
-
Target Account:
|
|
481
|
+
Target Account: Priority SMTP
|
|
633
482
|
Fallback Account: Gmail OAuth
|
|
634
483
|
Priority: 9
|
|
635
484
|
```
|
|
@@ -1343,11 +1192,11 @@ await strapi.plugin('email').service('email').send({
|
|
|
1343
1192
|
### VIP Customer Emails
|
|
1344
1193
|
|
|
1345
1194
|
```javascript
|
|
1346
|
-
// Route VIP customers via
|
|
1195
|
+
// Route VIP customers via a priority account
|
|
1347
1196
|
// Routing Rule:
|
|
1348
1197
|
// Match Type: Recipient
|
|
1349
1198
|
// Match Value: @vip-domain.com
|
|
1350
|
-
// Target Account:
|
|
1199
|
+
// Target Account: Priority SMTP
|
|
1351
1200
|
// Fallback Account: Gmail OAuth
|
|
1352
1201
|
|
|
1353
1202
|
await strapi.plugin('email').service('email').send({
|
|
@@ -1356,9 +1205,9 @@ await strapi.plugin('email').service('email').send({
|
|
|
1356
1205
|
html: content,
|
|
1357
1206
|
priority: 'high',
|
|
1358
1207
|
});
|
|
1359
|
-
// ✅ Routes via
|
|
1208
|
+
// ✅ Routes via Priority SMTP
|
|
1360
1209
|
// ✅ High priority headers added
|
|
1361
|
-
// ✅ Automatic fallback if
|
|
1210
|
+
// ✅ Automatic fallback if the priority account is unavailable
|
|
1362
1211
|
```
|
|
1363
1212
|
|
|
1364
1213
|
---
|
|
@@ -1444,12 +1293,12 @@ https://yourdomain.com/magic-mail/oauth/yahoo/callback
|
|
|
1444
1293
|
Create complex routing rules:
|
|
1445
1294
|
|
|
1446
1295
|
```javascript
|
|
1447
|
-
// Rule 1: VIP customers via
|
|
1296
|
+
// Rule 1: VIP customers via a priority account
|
|
1448
1297
|
{
|
|
1449
1298
|
name: "VIP Customer Emails",
|
|
1450
1299
|
matchType: "recipient",
|
|
1451
1300
|
matchValue: "@vip-customers.com",
|
|
1452
|
-
accountName: "
|
|
1301
|
+
accountName: "Priority SMTP",
|
|
1453
1302
|
fallbackAccountName: "Gmail OAuth",
|
|
1454
1303
|
priority: 10,
|
|
1455
1304
|
isActive: true
|
|
@@ -1594,44 +1443,9 @@ If MagicMail helps your project, please:
|
|
|
1594
1443
|
|
|
1595
1444
|
---
|
|
1596
1445
|
|
|
1597
|
-
##
|
|
1598
|
-
|
|
1599
|
-
MagicMail's direct dependencies are audited on every release, but two
|
|
1600
|
-
transitive paths are governed by upstream packages we do not control.
|
|
1601
|
-
If your own `npm audit` flags either of them, add the matching entry
|
|
1602
|
-
to your **Strapi project's** `package.json` (not this plugin's — npm
|
|
1603
|
-
`overrides` only take effect on the root project):
|
|
1604
|
-
|
|
1605
|
-
```jsonc
|
|
1606
|
-
{
|
|
1607
|
-
"overrides": {
|
|
1608
|
-
// GHSA-xq3m-2v4x-88gg — protobufjs <7.5.5 arbitrary code execution.
|
|
1609
|
-
// Reaches us via baileys → libsignal → protobufjs. We already ship
|
|
1610
|
-
// this override for local plugin development; apply it in your
|
|
1611
|
-
// Strapi project so the fix propagates to the installed tree.
|
|
1612
|
-
"protobufjs": "^7.5.5"
|
|
1613
|
-
}
|
|
1614
|
-
}
|
|
1615
|
-
```
|
|
1616
|
-
|
|
1617
|
-
After editing `package.json`, run:
|
|
1618
|
-
|
|
1619
|
-
```bash
|
|
1620
|
-
rm -rf node_modules package-lock.json
|
|
1621
|
-
npm install
|
|
1622
|
-
npm audit
|
|
1623
|
-
```
|
|
1624
|
-
|
|
1625
|
-
The critical `protobufjs` advisory disappears once the override is in
|
|
1626
|
-
place. Remaining `@strapi/design-system → lodash` advisories are
|
|
1627
|
-
Strapi-core issues and will clear up automatically when you upgrade
|
|
1628
|
-
`@strapi/strapi` to the latest patch release.
|
|
1446
|
+
## Dependency audits
|
|
1629
1447
|
|
|
1630
|
-
|
|
1631
|
-
install without the Baileys optional paths via
|
|
1632
|
-
`npm install strapi-plugin-magic-mail --ignore-scripts` — the plugin
|
|
1633
|
-
already guards every Baileys import with a try/catch and will log
|
|
1634
|
-
"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.
|
|
1635
1449
|
|
|
1636
1450
|
---
|
|
1637
1451
|
|