Build a Startup Cheatsheet
Email and SMS (Resend, Twilio)
Use this Build a Startup reference while you build software engineering projects, review code for technical interview prep, or polish examples for a software engineer resume.
Why Email and SMS Matter
Email and SMS are direct lines to your users. Transactional emails (password resets, receipts, verification codes) are required infrastructure. Marketing emails and SMS notifications are growth levers. Getting them wrong — high bounce rates, spam folder placement, or unresponsive templates — erodes trust and kills conversion.
Do not use nodemailer with a personal Gmail account in production. Gmail is not an email delivery service; it throttles volume and cannot be monitored. Use a dedicated email API.
Email Delivery: The Key Concepts
Transactional email — triggered by user actions: welcome email, password reset, payment receipt, shipping confirmation, verification code. Users expect these immediately.
Marketing email — scheduled campaigns, newsletters, product announcements. Subject to stricter deliverability rules and unsubscribe requirements (CAN-SPAM, GDPR).
Deliverability — the rate at which your emails reach the inbox (not spam). Depends on your sending domain's reputation, DNS configuration (SPF, DKIM, DMARC), and sending patterns.
SPF, DKIM, DMARC — DNS records that prove your emails are legitimate. Every email service will walk you through setting these up. Do it before you send to real users or Gmail will spam-folder everything.
Resend
Resend is the modern choice for transactional email — clean API, built for developers, and pairs with React Email for building templates in JSX.
Free tier: 3,000 emails/month, 100/day.
Pricing: $20/month for 50,000 emails; $90/month for 100,000.
Pros:
- The best developer experience in the category
- React Email: write email templates as React components with full TypeScript support
- Simple REST API and SDK (npm install resend)
- Built-in analytics (open rates, click rates, bounce rates)
- Domain verification and DNS setup is clear
- Webhook support for delivery events
Cons: - Newer service with a smaller track record than SendGrid - Marketing email campaigns are limited (it is focused on transactional) - Less mature deliverability reputation than older services for very high-volume senders
import { Resend } from "resend"; const resend = new Resend(process.env.RESEND_API_KEY); await resend.emails.send({ from: "Your App <hello@yourdomain.com>", to: user.email, subject: "Verify your email address", react: <VerificationEmail name={user.name} code={verificationCode} />, });
React Email Templates
// emails/verification.tsx import { Html, Head, Body, Container, Text, Button } from "@react-email/components"; export function VerificationEmail({ name, code }: { name: string; code: string }) { return ( <Html> <Head /> <Body style={{ fontFamily: "Inter, sans-serif", backgroundColor: "#ffffff" }}> <Container style={{ maxWidth: "560px", margin: "0 auto", padding: "40px 20px" }}> <Text>Hi {name},</Text> <Text>Your verification code is:</Text> <Text style={{ fontSize: "32px", fontWeight: "bold", letterSpacing: "8px" }}> {code} </Text> <Text>This code expires in 15 minutes.</Text> </Container> </Body> </Html> ); }
Preview your templates live:
npx react-email dev
SendGrid
SendGrid (now part of Twilio) is the most widely used email platform. It handles both transactional and marketing email.
Free tier: none — the long-standing "100 emails/day forever" plan was retired in 2025 in favor of a time-limited free trial (60 days), after which you need a paid plan.
Pricing: Essentials at $19.95/month for 50,000 emails; Pro at $89.95/month for 1.5M emails.
Pros: - Established reputation — very high deliverability - Handles massive volume (billions of emails per month) - Marketing campaigns, contact lists, unsubscribe management - SMTP support in addition to API (drop-in for nodemailer) - Detailed analytics
Cons: - API is older and more complex than Resend - Template editor is dated - No React Email support natively - Twilio acquisition has made support less responsive
When to use: You need marketing campaigns in addition to transactional email, or you need extremely high volume with a proven deliverability record.
Postmark
Postmark focuses exclusively on transactional email — and it has the fastest delivery times in the industry (median 3–5 seconds to inbox).
Free tier: 100 emails/month.
Pricing: $15/month for 10,000 emails.
When to use: Speed of delivery is critical (verification codes, time-sensitive notifications) and you are willing to pay for a dedicated transactional service.
Mailchimp
A marketing email platform, not a transactional email service. Good for newsletters and campaigns; not appropriate for password resets or receipts.
Free tier: 500 contacts, 1,000 sends/month.
Email Provider Comparison
| Provider | Best for | Free tier | Price (50K emails) | DX score |
|---|---|---|---|---|
| Resend | Modern transactional, dev teams | 3K/month | $20/month | Excellent |
| SendGrid | High volume, marketing + transactional | 60-day trial only | $19.95/month | Good |
| Postmark | Fastest transactional delivery | 100/month | $15/month | Very good |
| Mailchimp | Marketing campaigns, newsletters | 1K sends/month | $13/month | Average |
| AWS SES | Cheapest at scale | 3K/month, first 12 months | $5/month | Minimal |
Free-tier allowances shift constantly (SendGrid's "100/day forever" plan is gone; AWS SES retired its old 62K-from-EC2 allowance) — confirm on each vendor's pricing page before you wire a signup flow to one.
Recommendation for startups: Start with Resend for transactional email. Add Mailchimp or a dedicated marketing platform when your newsletter list grows and you need segmentation and campaigns.
SMS: Twilio
Twilio is the dominant SMS API. It provides SMS, voice calls, WhatsApp messaging, and verification codes (Twilio Verify).
No free tier — you pay per message from the start.
Pricing: - Outbound SMS (US): $0.0079/message (~$7.90 per 1,000) - Phone number rental: $1.15/month - Twilio Verify (OTP codes): $0.05/verification
Pros: - Largest carrier network; deliverable to 180+ countries - Twilio Verify handles OTP codes, including fallback to voice call - Programmable Messaging handles opt-out (STOP keyword) automatically — legally required - WhatsApp Business API available
Cons: - No free tier — costs start immediately - Pricing adds up for marketing SMS at scale - Compliance requirements (10DLC registration in the US for A2P messaging) add friction and fees
import twilio from "twilio"; const client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN); // Send an SMS await client.messages.create({ body: "Your verification code is 482931", from: process.env.TWILIO_PHONE_NUMBER, to: "+15551234567", }); // Or use Twilio Verify for OTP (handles rate limiting, retry, expiry) await client.verify.v2.services(process.env.TWILIO_VERIFY_SERVICE_SID).verifications.create({ to: "+15551234567", channel: "sms", }); // Verify the code the user entered const check = await client.verify.v2.services(serviceSid).verificationChecks.create({ to: "+15551234567", code: userEnteredCode, }); const verified = check.status === "approved";
SMS Alternatives
| Provider | Best for | Notes |
|---|---|---|
| Twilio | Global reach, OTP, full programmability | Industry standard; expensive at marketing scale |
| Vonage (Nexmo) | European markets; lower EU rates | Good alternative to Twilio outside US |
| Plivo | Cost reduction vs. Twilio | US routes ~30% cheaper; smaller network |
| AWS SNS | High volume, AWS stack | Cheapest at scale; minimal DX |
| Telnyx | Developer-friendly, cheaper | Good Twilio alternative with lower per-message cost |
| Loops | Email + SMS for SaaS | Combines transactional email and SMS in one platform |
Push Notifications (Web and Mobile)
For browser push notifications (not SMS):
- OneSignal — free tier for basic push; works for web (Service Workers) and mobile (iOS/Android)
- Firebase Cloud Messaging (FCM) — free; requires Google account; most common for mobile apps
- Expo Push Notifications — if you are using Expo (React Native), the simplest option
Compliance Requirements
Email: - Every marketing email must include an unsubscribe link (CAN-SPAM in the US, GDPR in the EU) - Transactional emails (receipts, password resets) are exempt from opt-out rules - Never send marketing email to users who did not opt in
SMS: - In the US, A2P (application-to-person) messaging requires 10DLC registration — $4–$10/month per brand + carrier fees. Twilio walks you through this. - Must honor STOP replies immediately — Twilio handles this automatically - TCPA compliance in the US: you must have explicit written consent before sending marketing SMS
When SMS is worth it:
- Verification / OTP codes (highest conversion rates for auth)
- Critical transactional alerts (payment declined, shipment shipped)
- High-engagement marketing for products where users have opted in and message value is high
For most early-stage startups, email alone is sufficient. Add SMS for OTP codes if your product needs phone-based auth, or for time-sensitive alerts.