Prompt
I'm building a TypeScript app. I need transactional emails for account verification, password resets, and billing notifications. What are some lightweight options?
Latest observation
For a TypeScript app, I’d start with Resend for a small integration, consider Postmark for a transactional-focused service, or use Amazon SES if usage-based cost is your main priority. Nodemailer is another lightweight option—but it’s a sending library, not an email delivery service.
Lightweight options
| Option | Why it fits | Main trade-off |
|---|---|---|
| Resend | Straightforward Node.js SDK, a small sending API, and support for React/TypeScript email templates. Its free plan includes 3,000 emails/month; paid plans start at $20/month for 50,000. resend+2 | You integrate with its provider-specific API. |
| Postmark | Official TypeScript-compatible SDK, hosted templates, and message streams that distinguish transactional mail from broadcasts. A good fit for verification, reset, and billing messages. postmarkapp+2 | Template management and sending use Postmark-specific APIs. |
| Amazon SES | Usage-based sending through an AWS SDK or SMTP, with no minimum fees or upfront commitments. Especially worth considering if your app already uses AWS. aws.amazon+1 | You work with AWS infrastructure rather than a narrowly focused email API. |
| Nodemailer + an SMTP provider | A small application-side integration with broad provider compatibility. Switching SMTP providers can be a configuration change rather than a rewrite. nodemailer | You still need an SMTP delivery provider; Nodemailer doesn’t replace one. nodemailer |
What the integration looks like
With Resend, the basic server-side TypeScript integration is this small. You’ll need an API key and a verified sending domain.
npm install resend
import { Resend } from "resend";
const resend = new Resend(process.env.RESEND_API_KEY);
export async function sendEmail(
to: string,
subject: string,
html: string,
) {
const { data, error } = await resend.emails.send({
from: "My App <notifications@yourdomain.com>",
to,
subject,
html,
});
if (error) {
throw new Error(error.message);
}
return data;
}
This follows Resend’s documented SDK pattern, including checking the returned error.
How I’d choose
- For the quickest start: Resend. Its SDK keeps the sending integration compact, and the free allowance makes it easy to begin.
- For hosted transactional templates: Postmark. Its
sendEmailWithTemplateAPI lets your application pass a template alias and data instead of building the full HTML in each sending call. - For usage-based AWS delivery: SES, directly through its API or through SMTP.
- For provider portability: Nodemailer with an SMTP service. Keep your application’s email interface separate from the transport configuration.
For your three email types, my suggested starting design is one small email module with sendVerificationEmail, sendPasswordResetEmail, and sendBillingNotification functions, backed by a single provider. That keeps the initial integration simple without spreading provider-specific calls throughout your app.
Citations
- https://resend.com/docs/send-with-nodejs
- https://postmarkapp.com/developer/integration/official-libraries
- https://aws.amazon.com/ses/pricing/?p=pdp&c=ses&s=3
- https://nodemailer.com/smtp
- https://nodemailer.com/
- https://aws.amazon.com/ses/
- https://postmarkapp.com/message-streams
- https://www.resend.com/pricing.md
- https://resend.com/docs/knowledge-base/what-is-resend-pricing
- https://postmarkapp.com/developer/user-guide/send-email-with-api
- https://resend.com/pricing?product=transactional
- https://resend.com/docs/email-types