React Email
Render React to HTML, then send with pigeon-node.
github.com/pigeonfs/react-email
All SDK libraries
API reference
Install
shell
npm install github:pigeonfs/react-email react react-dom
Send an email
JavaScript
import { Html, Head, Preview, Body, Container, Heading, Text, render } from "@pigeonfs/react-email"; import { Pigeon } from "pigeon"; export function Welcome({ firstName }) { return ( <Html> <Head /> <Preview>Welcome to Pigeon</Preview> <Body> <Container> <Heading>Welcome, {firstName}</Heading> <Text>Thanks for trying Pigeon.</Text> </Container> </Body> </Html> ); } const pigeon = new Pigeon("pg_your_key"); await pigeon.emails.send({ from: "Ada <ada@yourdomain.com>", to: "person@example.com", subject: "Welcome", html: await render(Welcome({ firstName: "Ada" })) });