A SendGrid extension for EverShop.
npm install @evershop/sendgridA SendGrid extension for EverShop. This extension is used to send email to customers.
> Note: This version requires EverShop version 2.1.1 or higher.
``javascript`
npm install @evershop/sendgrid
`javascript`
// config/default.json
{
...,
"system": [
...,
"extensions": [
...,
{
"name": "sendGrid",
"resolve": "node_modules/@evershop/sendgrid",
"enabled": true,
"priority": 10
}
]
]
}
`javascript`
// config/config.json
{
...,
"system": {
"notification_emails": {
"from": "noreply@example.com",
"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
}
}
}
}
`javascript``
// .env
SENDGRID_API_KEY = your_api_key;