0.0.2 • Published 10 months ago

@clientmail/react-email v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

@client-mail/react-email is a plugin for client-mail that enables you send email templates built with react-email.

Installation

  1. Add @client-mail/react-email to your project using your preferred package manager:

    With Yarn

    yarn add @clientmail/react-email

    With Npm

    npm install @clientmail/react-email

    With Pnpm

    pnpm install @clientmail/react-email
  2. Add it to the plugins when creating ClientMail class instance

    // Add import statement
    import { ReactEmailPlugin } from "@clientmail/react-email";
    import { ReactEmailTemplate } from "./emails";
    
    // Add to the ClientMail class instance
    const clientMail = new ClientMail("rc_A1..", {
      reactEmailAdapter: new ReactEmailPlugin(),
    });
  3. Send your react-email templates with react option.

    const data = {
      from: "Acme <onboarding@resend.dev>",
      to: ["delivered@resend.dev"],
      subject: "Hello World",
      // use `react` for react-email templates
      react: <ReactEmailTemplate name={"Paul"} />,
    };
    
    clientMail.resend(data);

Contributing

Contributions to client-mail are welcome! If you find a bug, have suggestions for improvements, or want to add new features, feel free to open an issue or submit a pull request. Please make sure to follow the existing coding style and conventions.

When submitting a pull request, provide a clear description of the changes made and ensure that all tests pass. Adding appropriate tests for new features or bug fixes is highly appreciated.

Bugs and Feature Requests

For bugs and feature requests, please create an issue.

Author

License

@clientmail/react-email is licensed under the MIT License.

0.0.2

10 months ago

0.0.1

10 months ago