Features
Transactional email with Resend and React Email — Mailpit for local testing.
TheShipStack uses Resend for sending email and React Email for templating.
Local email testing
All emails sent locally are captured by Mailpit — no Resend API key needed. See Local Development for access details.
Email templates
Templates live in emails/. Each template is a React component:
emails/
verify-email.tsx
reset-password.tsx
welcome.tsxSending an email
import { sendEmail } from '@/lib/email'
import { WelcomeEmail } from '@/emails/welcome'
await sendEmail({
to: user.email,
subject: 'Welcome to MyApp',
react: <WelcomeEmail name={user.name} />,
})Creating a new template
- Create a new file in
emails/:
// emails/post-published.tsx
import { Html, Body, Container, Text } from '@react-email/components'
interface Props {
postTitle: string
}
export function PostPublishedEmail({ postTitle }: Props) {
return (
<Html>
<Body>
<Container>
<Text>Your post "{postTitle}" has been published.</Text>
</Container>
</Body>
</Html>
)
}- Send it using
sendEmailas shown above.