Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Hemann55/medusa-plugin-mailjet
Mailjet Plugin for Medusa to send transactional emails.
https://github.com/Hemann55/medusa-plugin-mailjet
Last synced: about 1 month ago
JSON representation
Mailjet Plugin for Medusa to send transactional emails.
- Host: GitHub
- URL: https://github.com/Hemann55/medusa-plugin-mailjet
- Owner: Hemann55
- Created: 2023-03-22T19:32:38.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-02-01T12:53:03.000Z (10 months ago)
- Last Synced: 2024-11-02T11:56:02.274Z (about 1 month ago)
- Language: JavaScript
- Size: 509 KB
- Stars: 7
- Watchers: 2
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
- awesome-medusajs - Mailjet - square) ![stars](https://img.shields.io/github/stars/Hemann55/medusa-plugin-mailjet) (Uncategorized / Uncategorized)
README
# medusa-plugin-mailjet
Mailjet Plugin for Medusa to send transactional emails.
This plugin is based on Medusa's official [Sendgrid plugin](https://docs.medusajs.com/add-plugins/sendgrid) with Mailjet specific modifications.
## Options
If no values are defined for a given option, the plugin will not try to send an email for that event.
```js
{
resolve: `medusa-plugin-mailjet`,
options: {
public_key: process.env.MAILJET_PUBLIC_KEY, //required
private_key: process.env.MAILJET_PRIVATE_KEY, //required
from: 'Medusa [email protected]', //Name[space]email
template_error_reporting: 'Medusa [email protected]', //to use mailjet's template error reporting
customer_created_template: '[used on customer.created]',
gift_card_created_template: '[used on gift_card.created]',
order_placed_template: '[used on order.placed]',
order_canceled_template: '[used on order.canceled]',
order_shipped_template: '[used on order.shipment_created]',
order_completed_template: '[used on order.completed]',
user_password_reset_template: '[used on user.password_reset]',
customer_password_reset_template: '[used on customer.password_reset]',
localization: {
'de-DE': {
// locale key
customer_created_template: '[used on customer.created]',
gift_card_created_template: '[used on gift_card.created]',
order_placed_template: '[used on order.placed]',
order_canceled_template: '[used on order.canceled]',
order_shipped_template: '[used on order.shipment_created]',
order_completed_template: '[used on order.completed]',
user_password_reset_template: '[used on user.password_reset]',
customer_password_reset_template: '[used on customer.password_reset]',
},
},
},
}
```## Dynamic usage
You can resolve the Mailjet service to dynamically send emails via mailjet.
Example:
```js
const mailjetService = scope.resolve('mailjetService')
mailjetService.sendEmail(
'd-123....',
'ACME ',
'[email protected]',
{ dynamic: 'data' }
)
```