Email accounts and routing rules
Configure email accounts and route messages using the plugin's routing rules. Supported account setup includes Gmail, Microsoft 365, Yahoo, SMTP, SendGrid, and Mailgun.
Magic-Mail is a Strapi 5 plugin for managing email accounts, routing rules, templates, and delivery analytics. It handles email only.
Magic-Mail provides email account management and delivery tools in the Strapi admin.
Configure email accounts and route messages using the plugin's routing rules. Supported account setup includes Gmail, Microsoft 365, Yahoo, SMTP, SendGrid, and Mailgun.
Create email templates, keep template versions, and review email delivery logs and analytics.
Start Gmail, Microsoft, and Yahoo account authorization from the admin interface.
The plugin exposes email sending and tracking. WhatsApp transport and its connection state belong to the separate Magic-WhatsApp plugin.
The package declares Strapi ^5.57.0 as a peer dependency and requires Node.js >=20.19.0 <=26.x.x.
npm install strapi-plugin-magic-mail
npm run build
Enable the plugin in your Strapi configuration:
export default () => ({
'magic-mail': {
enabled: true,
},
});
After enabling the plugin, open MagicMail in the Strapi admin to add an email account and configure routing rules, templates, and plugin settings.
MAGIC_MAIL_ENCRYPTION_KEY to a secret of at least 32 bytes. Keep it stable: changing the key makes previously stored account credentials unreadable.See the README setup guide for provider-specific configuration and callback URLs.
Admin API routes require an authenticated Strapi administrator with the plugin::magic-mail.access permission.
Content API routes use the /api/magic-mail prefix.
| Method | Path | Purpose |
|---|---|---|
POST | /send | Send an email through the Magic-Mail router. |
POST | /send-message | Send an email using the message endpoint. |
GET | /track/open/:emailId/:recipientHash | Record an email open. |
GET | /track/click/:emailId/:linkHash/:recipientHash | Record a tracked click and redirect. |
Admin routes cover accounts, OAuth setup, routing rules, templates, analytics, and plugin settings. They require the admin permission described above. See the route definitions and README for details.
Releases use semantic-release on pushes to main. Conventional Commits determine version changes. The release workflow runs tests, builds the plugin, verifies its exports, then publishes the npm package.
npm ci --legacy-peer-deps
npm test
npm run build
npm run verify