SendGrid provider for Strapi
# using yarn
yarn add @strapi/provider-email-sendgrid
# using npm
npm install @strapi/provider-email-sendgrid --save
Variable | Type | Description | Required | Default |
---|---|---|---|---|
provider | string | The name of the provider you use | yes | |
providerOptions | object | Provider options | yes | |
providerOptions.apiKey | object | Api key given to the function setApiKey. Please refer to @sendgrid/mail | yes | |
settings | object | Settings | no | {} |
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 |
:warning: The Shipper Email (or defaultfrom) may also need to be changed in the
Email Templates
tab on the admin panel for emails to send properly
Path - config/plugins.js
1module.exports = ({ env }) => ({
2 // ...
3 email: {
4 config: {
5 provider: 'sendgrid',
6 providerOptions: {
7 apiKey: env('SENDGRID_API_KEY'),
8 },
9 settings: {
10 defaultFrom: 'myemail@protonmail.com',
11 defaultReplyTo: 'myemail@protonmail.com',
12 },
13 },
14 },
15 // ...
16});
npm install @strapi/provider-email-sendgrid
Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.