You need to have the plugin strapi-plugin-email
installed in you Strapi project.
# using yarn
yarn add strapi-provider-email-mailgunjs@npm:@sancsoft/strapi-provider-email-mailgunjs
# using npm
npm install strapi-provider-email-mailgunjs@npm:@sancsoft/strapi-provider-email-mailgunjs --save
Variable | Type | Description | Required | Default |
---|---|---|---|---|
provider | string | The name of the provider you use | yes | |
providerOptions | object | Will be directly given to the require('mailgun.js') . Please refer to mailgun.js doc. |
yes | |
settings | object | Settings | yes | {} |
settings.domain | string | Mailgun sending domain | yes | |
settings.defaultFrom | string | Default sender mail address | no | undefined |
settings.defaultReplyTo | string | array | Default address or addresses the receiver is asked to reply to | no | undefined |
Path - config/plugins.js
module.exports = ({ env }) => ({
// ...
email: {
provider: 'mailgunjs',
providerOptions: {
key: env('MAILGUN_API_KEY')
},
settings: {
domain: env('MAILGUN_DOMAIN'), // Required
defaultFrom: '[email protected]',
defaultReplyTo: '[email protected]',
},
},
// ...
});