Skip to content

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

Notifications You must be signed in to change notification settings

lordelogos/clientmail-react-email

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

client mail logo

@clientmail/react-email

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

Installation

  1. Add @clientmail/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.

About

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

Topics

Resources

Stars

Watchers

Forks