Daniel Mocan

Tech Lead & GlobalLogic

Meetup organizer 

 @danielsmocan

How it started

I'm a Technical Lead, so I can change an email footer

What I found

emails in the old monolith not migrated

emails in the new system

email templates in the mail service provider (Mailgun)

Spike & POC

React Email

Why did we choose React Email?

same stack

reusable components

awesome preview

popular and maintained package

import {
  Html, Head, Preview, Body, Container,
  Row, Column, Heading, Text, Button, Tailwind
} from "@react-email/components";

export const WelcomeToReactAlicante= ({ name = "friend" }) => {(
    <Html>
      <Head />
      <Preview>Welcome to React Alicante</Preview>
      <Tailwind>
        <Body className="bg-gray-100 font-sans">
          <Container className="mx-auto my-10 p-6 bg-white rounded-lg">
            <Heading className="text-xl font-semibold mb-4">Hello {name}</Heading>
            <Row>
              <Column><Text className="text-gray-700">React Alicante</Text></Column>
              <Column><Text className="text-gray-700">Beaches, sun and good talks</Text></Column>
            </Row>
            <Button href="https://reactalicante.es" className="mt-6 px-4 py-2 rounded-md bg-black text-white">
              Show full scheduale
            </Button>
          </Container>
        </Body>
      </Tailwind>
    </Html>
  );
}
import sgMail from "@sendgrid/mail";
import { render, toPlainText } from "@react-email/render";
import TicketPurchaseConfirmationEmail from "./emails/ticket-purchase-confirmation-email";

sgMail.setApiKey(process.env.SENDGRID_API_KEY!);

export const sendTicketPurchaseConfirmation = async (
  to: string,
  name: string,
  orderId: string
) => {
  const html = await render(<TicketPurchaseConfirmationEmail name={name} orderId={orderId} />);
  const text = toPlainText(html);

  const msg = {
    to,
    from: process.env.SENDGRID_FROM!,
    subject: "Thank you for joining React Alicante 2025 - Ticket Purchase",
    html,
    text,
  };

  await sgMail.send(msg);

  console.log(`Email sent to ${to}`);
};

Demo Time

DX is awesome

consistency across email clients

good context to give to AI

Why I Like React Email

easy integration

export

"React Email: less pain, more fun"

Daniel Mocan - React Alicante 2025

¡Gracias!

Fun with Email (React Alicante)

By Daniel Mocan

Fun with Email (React Alicante)

  • 37