I'm building medusajs project, I want in case of reset password of customers, admins and invite new admin to send through their emails...
I have resend. Let me know if anymore information is needed.
My resend API Key: re_QzRJZs7G_3YadsHNAhrLHZi2eSLhoKDtU
API Name: "staff"
Domain: "staff.satteen.com"
medusa-plugin-resend-custom | Medusa
Features
    Templates are stored locally.
    Templates can either be handlebars templates or compiled React templates
    You can refer to the Medusa template reference to see all data fields that are available for each event: Template Reference
    An API endpoint that is useful for testing and that can be used with other (non-Medusa) portions of your storefront application is included. By default, the endpoint does nothing for security reasons. See configuration options below to enable it.

Installation

Inside your medusa backend root folder, type:

Replace "yarn add" with the correct command for your package manager if you are using (for example) npm, pnpm, or bun.
Configuration

Enable in your medusa-config.js file similar to other plugins:

    Obtain an API key from your Resend dashboard

    The 'from' setting should be a valid email address on a domain you have properly configured with Resend

    The template path is the location of your email templates. It can be a full (absolute) path or a path relative to the medusa root folder, e.g., 'data/templates'.

    The 'subject_template_type' can be 'handlebars' or 'text'. The default is handlebars. If you choose text, you cannot include dynamic values (like customer name or order number) in your subject lines.

    The body_template_type' can be 'handlebars' or 'react'. The default is handlebars. See below for info on using React templates.

Why Resend?

Fortunately, there are now many options for notification providers that can be used with Medusa, including Sendgrid, AWS Simple Email Service (SES), Postmark, and Resend.

A major pro of Resend in some use cases is the ability to use React email templates. If your frontend is a Nextjs app, using React templates that can be added to version control is likely ideal for your use case. It allows your frontend developers to stay in one syntax and reuse assets and design elements.

    Easy and quick to set up with no initial sandbox mode that restricts recipients
    Uses local email templates that can be added to version control repos
    Uses Handlebars OR React templates

Templates

The templates used are stored locally. Create a 'data/templates' folder and include the entire path in the RESEND_TEMPLATE_PATH variable.

Not all of the above files are required. You only need either subject.hbs or subject.text, depending on whether you have opted to use text or handlebars subject type. If you have opted to use React body templates, you do not need html.hbs or text.hbs. If you have opted to use Handlebars body templates you do not need the React templates. You can use either html.hbs or text.hbs, or both. If you include both, both templates will be compiled and sent, and it will be up to the user's email client which gets rendered.
Transpiling React Templates

Inside your template folder (NOT your main medusa server folder), install babel:

Example of compiling a template:

More options and convenient tooling for compiling Medusa email templates are in the works, including Tailwind CSS processing.
Testing

This plugin adds an endpoint at http://[server]/resend/send

By default, the endpoint will refuse to send any emails. This endpoint may be useful for testing purposes in a development environment or for use by related applications.

There is NO SECURITY on the endpoint by default. Most people will NOT need to enable this endpoint. If you are certain that you want to enable it and that you know what you are doing, set the environment variable RESEND_ENABLE_ENDPOINT to "42" (string). The unsual setting is meant to prevent enabling by accident or without thought. To use the endpoint, POST a json req.body with: template_id, from, to, and data to /ses/send.
Template Reference

This section covers the template types supported by the plugin and what variables you can expect in your dynamic template. You can use the variables to add details like order total or customer name.
Note

You don’t have to create a template for every type in the reference. You can simply create templates for the type of emails you want to send.
Order Placed

Key in plugin options: order_placed_template

Description: Template to be sent to the customer when they place a new order.
Example Data
Order Canceled

Key in plugin options: order_canceled_template

Description: Template to be sent to a customer when their order is canceled.
Example Data
Order Shipment Created

Key in plugin options: order_shipped_template

Description: Template to be sent to the customer when a shipment of their order has been created.
Example Data
Order Return Requested

Key in plugin options: order_return_requested_template

Description: Template to be sent to the customer when a return request is made for an order.
Example Data
Order Items Returned

Key in plugin options: order_items_returned_template

Description: Template to be sent to the customer when an order’s items have been returned.
Example Data
Claim Shipment Created

Key in plugin options: claim_shipment_created_template

Description: Template to be sent to the customer when a Claim shipment has been created.
Example Data
Swap Created

Key in plugin options: swap_created_template

Description: Template to be sent to the customer when a swap for an order has been created.
Example Data
Swap Shipment Created

Key in plugin options: swap_shipment_created_template

Description: Template to be sent to the customer when a shipment of a swap of an order has been created.
Example Data
Swap Received

Key in plugin options: swap_received_template

Description: Template to be sent to the customer when a swap of an order has been received.
Example Data
Gift Card Created

Key in plugin options: gift_card_created_template

Description: Template to be to the customer sent when a gift card in their order has been created.
Example Data
Customer Password Reset

Key in plugin options: customer_password_reset_template

Description: Template to be sent to the customer when they request a password reset.
Example Data

Object {
  "id": Any<String>,
  "email": "test@testson.com",
  "first_name": "Chyna",
  "last_name": "Osinski",
  "token": Any<String>,
}

User Password Reset

Key in plugin options: user_password_reset_template

Description: Template to be sent to the admin user when they request a password reset.
Example Data

Object {
  "email": "test@testson.com",
  "token": Any<String>,
}

Restock Notification

Key in plugin options: medusa_restock_template

Description: Template to be sent to admin users when a product has hit the restock quantity threshold.
Example Data

Object {
  "product": Object {
    "collection_id": null,
    "created_at": Any<Date>,
    "deleted_at": null,
    "description": null,
    "discountable": true,
    "external_id": null,
    "handle": null,
    "height": null,
    "hs_code": null,
    "id": "test-product",
    "is_giftcard": false,
    "length": null,
    "material": null,
    "metadata": null,
    "mid_code": null,
    "origin_country": null,
    "profile_id": Any<String>,
    "status": "draft",
    "subtitle": null,
    "thumbnail": "",
    "title": "Awesome Metal Ball",
    "type_id": null,
    "updated_at": Any<Date>,
    "weight": null,
    "width": null,
  },
  "variant": Object {
    "allow_backorder": false,
    "barcode": null,
    "created_at": Any<Date>,
    "deleted_at": null,
    "ean": null,
    "height": null,
    "hs_code": null,
    "id": "test-variant",
    "inventory_quantity": 10,
    "length": null,
    "manage_inventory": true,
    "material": null,
    "metadata": null,
    "mid_code": null,
    "origin_country": null,
    "product": Object {
      "collection_id": null,
      "created_at": Any<Date>,
      "deleted_at": null,
      "description": null,
      "discountable": true,
      "external_id": null,
      "handle": null,
      "height": null,
      "hs_code": null,
      "id": "test-product",
      "is_giftcard": false,
      "length": null,
      "material": null,
      "metadata": null,
      "mid_code": null,
      "origin_country": null,
      "profile_id": Any<String>,
      "status": "draft",
      "subtitle": null,
      "thumbnail": null,
      "title": "Awesome Metal Ball",
      "type_id": null,
      "updated_at": Any<Date>,
      "weight": null,
      "width": null,
    },
    "product_id": "test-product",
    "sku": null,
    "title": "Practical Granite Pizza",
    "upc": null,
    "updated_at": Any<Date>,
    "weight": null,
    "width": null,
  },
  "variant_id": "test-variant",
  "emails": Array [
    "test@testson.com"
  ]
}