Prompt
I'm a solo developer. how do I track email delivery?
Latest observation
Tracking email delivery depends on whether you are sending transactional app emails (via code) or manual 1-to-1 emails (from Gmail/Outlook).
Strategy 1: Transactional App Emails (API / Code)
If you are building an application that sends transactional emails (password resets, magic links, receipts), do not try to run your own SMTP server or parse raw bounce headers. Instead, use a developer-focused Email API provider with native webhooks and delivery logs.
1. Pick a Developer-Friendly Email API
- Resend (Very popular with solo devs; modern API, clean UI, generous free tier)
- Postmark (Known for ultra-fast delivery and long log retention)
- SendGrid / Mailgun (Established industry standards)
- AWS SES (Cheapest at scale, but setup/DNS standardizing is clunkier)
2. Configure Domain Authentication (Mandatory)
Before tracking delivery, ensure your emails actually arrive by setting up DNS records at your domain registrar:
- SPF: Authorizes the API service to send on behalf of your domain.
- DKIM: Cryptographically signs your emails to prevent spoofing.
- DMARC: Specifies how receiving servers should handle unauthenticated emails.
3. Implement Delivery Tracking via Webhooks
Checking API responses only tells you if the provider accepted your request—not if the recipient received it. Set up an endpoint in your server app to listen for provider webhooks:
JavaScript
// Example: Express.js webhook listener for email events
app.post('/api/webhooks/email', (req, res) => {
const { event, recipient, messageId } = req.body;
switch (event) {
case 'delivered':
// Email reached the recipient's mail server
updateEmailStatus(messageId, 'DELIVERED');
break;
case 'bounced':
case 'failed':
// Invalid email address or blocked by spam filter
updateEmailStatus(messageId, 'BOUNCED');
flagUserBadEmail(recipient);
break;
case 'complained':
// Recipient marked it as spam — stop sending to them!
suppressEmail(recipient);
break;
}
res.status(200).send('Webhook received');
});
4. Engagement Tracking (Opens & Clicks)
- Open Tracking: Email providers insert an invisible 1x1 pixel image into the email HTML. When loaded, it triggers an open event.
- Click Tracking: Provider rewrites links to route through a tracking redirect before taking the user to the target URL.
Warning on Engagement Metrics: Modern email clients (like Apple Mail Privacy Protection) pre-fetch images in proxy servers, causing false-positive opens. Use delivery/bounce webhooks as your source of truth for technical delivery, not open rates.
Strategy 2: Manual / One-off Emails (Outreach or Support)
If you are doing manual sales outreach or support from your browser:
- Use lightweight browser extensions such as Mailtrack, HubSpot Sales, or Streak for Gmail/Outlook.
- These inject tracking pixels automatically without requiring code.