@evershop/sendgrid
v2.1.1
Published
A SendGrid extension for EverShop.
Maintainers
Readme
SendGrid emailing for EverShop
A SendGrid extension for EverShop. This extension is used to send email to customers.
Note: This version requires EverShop version 2.1.1 or higher.
Installation
Step 1: Install the extension package
npm install @evershop/sendgridStep 2: Register the extension by adding it to the config file
// config/default.json
{
...,
"system": [
...,
"extensions": [
...,
{
"name": "sendGrid",
"resolve": "node_modules/@evershop/sendgrid",
"enabled": true,
"priority": 10
}
]
]
}Step 3: Configure the extension
// config/config.json
{
...,
"system": {
"notification_emails": {
"from": "[email protected]",
"order_confirmation": {
"enabled": true,
"templatePath": null, // In case you want to manage email template manually from source code. It should be the relative path from the project root. Missing this field or setting it to null will use the default template from EverShop
"templateId": null // In case you want to use SendGrid dynamic template. This ID takes precedence over templatePath
},
"customer_welcome": {
"enabled": true,
"templatePath": null,
"templateId": null
},
"customer_password_reset": {
"enabled": true,
"templatePath": null,
"templateId": null
}
}
}
}Step 4: Add the API key to the environment variables
// .env
SENDGRID_API_KEY = your_api_key;