https://github.com/adifaidz/react-jsx-email-poc
express-emails
https://github.com/adifaidz/react-jsx-email-poc
Last synced: 7 months ago
JSON representation
express-emails
- Host: GitHub
- URL: https://github.com/adifaidz/react-jsx-email-poc
- Owner: adifaidz
- Created: 2023-08-05T16:00:43.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-08-05T16:35:20.000Z (about 2 years ago)
- Last Synced: 2025-01-11T23:23:28.180Z (9 months ago)
- Language: TypeScript
- Size: 46.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# What is this ?
A basic POC of sending email using nodemailer with React/JSX templating + react-email package
# What does this accomplish ?
- No string literals templating, all done using JSX
- A local server to view those templates in browser via react-email
- Better overall experience in building emails# Sending the email
```bash
# Install packages
pnpm install# Create .env with values
# In recommend using mailtrap to test# Once done...
# Build the project
pnpm build# Run the code
node dist/index.js# Profit!
```
If you setup correctly, you should be able to see email sent to your smtp server, in this case, mailtrap
# Other commands
```bash
# Running this command
# will spun up a server.
# You can preview your email templates there
# default to locahost:3000
pnpm email:preview# Running this command will export the templates
pnpm email:export# More info here: https://react.email/docs/cli
```# References
- React Email : https://react.email/
- Example project: https://github.com/resendlabs/react-email/tree/main/examples/nodemailer
- Email templates: https://github.com/resendlabs/react-email/tree/main/demo/emails
- Mailtrap : https://mailtrap.io