Built by






Last updated

May 14, 2024, 22:24:15 PM2 months ago

Medusa email plugin

Send emails on certain actions in medusa store

Email templates

All email templates are stored under Copy to clipboarddata/emails directory. This directory can be copy-pasted inside your medusa backend root directory.


Run the following command
npm install --save @rootxpdev/medusa-email-plugin
yarn add @rootxpdev/medusa-email-plugin
Add the following values to your Copy to clipboardmedusa-config.js file
const plugins = [
// ...other plugin configuration
resolve: "@rootxpdev/medusa-email-plugin",
options: {
templateDir: "node_modules/@rootxpdev/medusa-email-plugin/data/emails",
fromAddress: "noreply@mymedusastore.com",
smtpHost: "sandbox.smtp.mailtrap.io",
smtpPort: 2525,
smtpUser: "xxx",
smtpPassword: "xxx",

Testing locally

Run the following command to register this module locally
yarn link
Run this command inside your medusa backend folder to use it
yarn link "@rootxpdev/medusa-email-plugin"

Test emails

Launch your medusajs backend and call the following endpoint
curl --request POST \
--url http://localhost:9000/admin/email_test \
--header 'Content-Type: application/json' \
--data '{
"event": "testing",
"payload": {
"foo": "bar"

Build your own plugins

Develop your own plugins with our API to speed up your processes.

Make your plugin available via npm for it to be shared in our Plugin Library with the broader Medusa community.