To use Postmark with SuperStarter

1

Create a Postmark account

Create a Postmark account and grab your API key.

2

Add environment variables

Add the POSTMARK_TOKEN environment variables to your .env.local file and your deployment environment:

Then, make sure to activate Postmark:

/packages/email/index.ts
export * from './providers/postmark';
3

Sending Emails

apps/web/app/contact/actions/contact.tsx
import { postmarkClient } from '@repo/email';
import { ContactTemplate } from '@repo/email/emails/contact';
import { render } from "@react-email/components";

const emailHtml = await render(<ContactTemplate name={name} email={email} message={message} />);

await postmarkClient.send({
    From: 'sender@acme.com',
    To: 'recipient@acme.com',
    Subject: 'The email subject',
    HtmlBody: emailHtml,
});