@eropple/nestjs-rx-mailer
v0.1.0
Published
Build and send rich HTML emails easily with JSX and React as part of your NestJS app.
Downloads
5
Readme
@eropple/nestjs-rx-mailer
Inspired by @nest-modules/mailer and foiled by its API (in a way that'd require powder-kegging the library, so it'd be rude to ask!), I've written a simple mailer library built around Nodemailer that I've taken to calling rx-mailer. Its gimmick is really straightforward: feed it some happily type-safe React and out the other end will pop an email, square into the inbox of your favorite recipient.
The bit that's inspired by @nest-modules/mailer is, of course, that I spend a lot of time working with NestJS and sometimes I even want to send an email. So here we've got @eropple/nestjs-rx-mailer
: a thin module that provides via the NestJS dependency injector an instance of rx-mailer's Mailer
.
Installation
As per @eropple/rx-mailer itself, this package has react
, prop-types
, and react-dom
as peer dependencies (so you aren't tied to exactly the versions that we had available). Install the packages you need a-like so:
npm install --save @eropple/nestjs-rx-mailer react prop-types react-dom
yarn add @eropple/nestjs-rx-mailer react prop-types react-dom
Usage
Please note: This section covers how to get an instance of the mailer in your application. If you'd like to learn more about how to use rx-mailer, take a look at its repo.
Special Thanks
react-html-email
(MIT licensed, for the React email components)@nest-modules/mailer
(MIT licensed, for guidance re: Nodemailer setup)