strapi-provider-email-maileroo
v1.1.0
Published
Maileroo email provider for Strapi v4/v5
Maintainers
Readme
strapi-provider-email-maileroo
Email provider for Strapi (v4 & v5) using Maileroo transactional email API.
Installation
# npm
npm install strapi-provider-email-maileroo
# yarn
yarn add strapi-provider-email-mailerooConfiguration
Environment variables
Add your Maileroo API key to your .env file:
MAILEROO_API_KEY=your_api_key_hereYou can find your API key in the Maileroo dashboard.
Strapi plugin config
Strapi v4 — config/plugins.js
module.exports = ({ env }) => ({
email: {
config: {
provider: 'maileroo',
providerOptions: {
apiKey: env('MAILEROO_API_KEY'),
},
settings: {
defaultFrom: '[email protected]',
defaultReplyTo: '[email protected]',
},
},
},
});Strapi v5 — config/plugins.ts or config/plugins.js
export default ({ env }) => ({
email: {
config: {
provider: 'maileroo',
providerOptions: {
apiKey: env('MAILEROO_API_KEY'),
},
settings: {
defaultFrom: '[email protected]',
defaultReplyTo: '[email protected]',
},
},
},
});Configuration options
providerOptions
| Option | Type | Required | Description |
| -------- | ------ | -------- | ------------------------------------------------- |
| apiKey | string | Yes | Your Maileroo API key from the dashboard |
settings
| Option | Type | Required | Description |
| ------------------ | ----------------------- | -------- | ------------------------------------------- |
| defaultFrom | string | No | Default sender email address |
| defaultReplyTo | string | string[] | No | Default reply-to address(es) |
Note: The sender domain must be verified in your Maileroo account.
Advanced usage
The provider passes through several Maileroo-specific fields when included in the send options:
| Field | Type | Description |
| -------------- | ------- | -------------------------------------------------- |
| tracking | boolean | Enable/disable open and click tracking |
| tags | array | Array of tags to categorize the email |
| headers | object | Custom email headers |
| attachments | array | Email attachments |
| scheduled_at | string | ISO 8601 datetime to schedule delivery |
| reference_id | string | Your own reference ID for tracking |
Example with advanced options
await strapi.plugins['email'].services.email.send({
to: '[email protected]',
from: '[email protected]',
subject: 'Welcome!',
html: '<p>Hello world</p>',
tracking: true,
tags: ['welcome', 'onboarding'],
reference_id: 'user-123-welcome',
});Email address formats
Both plain strings and objects are supported for to, cc, bcc, and replyTo:
// Plain string
to: '[email protected]'
// With display name
to: { address: '[email protected]', name: 'John Doe' }
// Multiple recipients
to: ['[email protected]', { address: '[email protected]', name: 'Jane' }]Requirements
- Node.js >= 18
- Strapi v4 or v5
- A Maileroo account with a verified sending domain
License
MIT
