Now that you have a component, use the render function to convert it to HTML, and send it with Plunk.
Copy
import Plunk from "@plunk/node";import { render } from "jsx-email";import { Email } from "./email";const plunk = new Plunk(process.env.PLUNK_API_KEY);const body = render(<Email url={"https://useplunk.com"} />);plunk.emails.send({ to: "hello@useplunk.com", subject: "Hello world!", body,});
Plunk actions support JSX Email as well. You cannot use JSX Email directly, and will have to compile your JSX Email component to HTML first.Once you have your HTML, you can paste it into the Plunk template editor and use it as a template for your actions.