<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Email Digit Developer Guides]]></title><description><![CDATA[Email Digit Developer Guides]]></description><link>https://emaildigit.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 22 Nov 2026 15:40:17 GMT</lastBuildDate><atom:link href="https://emaildigit.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[SendGrid Plans Explained for Developers: Find the Price Cliffs Before Your Bill Does (With a Tier-Picker Script)]]></title><description><![CDATA[SendGrid plans by monthly volume as of Nov 2026, where the price jumps sit, and a small JS script that picks a tier from your own send logs.]]></description><link>https://emaildigit.hashnode.dev/sendgrid-plans-explained-for-developers-find-the-price-cliffs-before-your-bill-does-with-a-tier-picker-script</link><guid isPermaLink="true">https://emaildigit.hashnode.dev/sendgrid-plans-explained-for-developers-find-the-price-cliffs-before-your-bill-does-with-a-tier-picker-script</guid><category><![CDATA[email]]></category><category><![CDATA[api]]></category><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[Sohail Malik]]></dc:creator><pubDate>Sat, 21 Nov 2026 02:04:08 GMT</pubDate><content:encoded><![CDATA[<p>Picture the Slack message. "Hey, why did the email bill go from $35 to $249?" Nobody changed a line of code. The app simply had a good month, password resets and receipts crept past a round number, and the pricing page did the rest.</p>
<p>SendGrid plans are priced by monthly email volume, and the steps between tiers are not smooth. If you are a developer who owns the email integration, you are usually the person who gets asked about that bill. This guide walks through SendGrid's Email API plans as listed on its pricing page on November 21, 2026, shows where the price cliffs sit, and gives you a 30-line script to pick a tier from your own send logs.</p>
<h2>SendGrid plans at a glance (as of November 21, 2026)</h2>
<p>All prices below come from the <a href="https://www.twilio.com/en-us/products/email-api/pricing">Twilio SendGrid Email API pricing page</a>, read on November 21, 2026, in USD per month. Taxes and overages may apply, per the page.</p>
<table>
<thead>
<tr>
<th>Plan</th>
<th>Monthly emails</th>
<th>Price per month</th>
</tr>
</thead>
<tbody><tr>
<td>Free trial</td>
<td>100 a day, for 60 days</td>
<td>$0</td>
</tr>
<tr>
<td>Essentials 50k</td>
<td>50,000</td>
<td>$19.95</td>
</tr>
<tr>
<td>Essentials 100k</td>
<td>100,000</td>
<td>$34.95</td>
</tr>
<tr>
<td>Pro 100k</td>
<td>100,000</td>
<td>$89.95</td>
</tr>
<tr>
<td>Pro 300k</td>
<td>300,000</td>
<td>$249.00</td>
</tr>
<tr>
<td>Pro 700k</td>
<td>700,000</td>
<td>$499.00</td>
</tr>
<tr>
<td>Pro 1.5M</td>
<td>1,500,000</td>
<td>$799.00</td>
</tr>
<tr>
<td>Pro 2.5M</td>
<td>2,500,000</td>
<td>$1,099.00</td>
</tr>
<tr>
<td>Premier</td>
<td>Custom</td>
<td>Contact sales</td>
</tr>
</tbody></table>
<p>What the extra money buys on Pro, according to the same page: dedicated IPs included, subuser management, single sign-on, up to 1,000 teammates, 5 event webhooks and 2,500 email validations. Essentials lists 1 extra teammate, 2 event webhooks and no email validations.</p>
<h2>Where the cliffs are</h2>
<p>Two jumps matter for most apps:</p>
<ol>
<li><strong>Above 100,000 emails a month, Essentials stops.</strong> The Essentials range on the page tops out at 100,000. The next plan that covers 110,000 emails is Pro 300k at $249. That is the $35 to $249 Slack message from the opening.</li>
<li><strong>Pro 100k costs more than Essentials 100k for the same volume.</strong> At 100,000 emails you pay $89.95 instead of $34.95. The difference is the feature list (dedicated IP, SSO, subusers), not the sending allowance.</li>
</ol>
<p>The FAQ on the pricing page says that going past your plan's limit can add overage charges on top of the monthly rate, and that moving to the next tier usually beats paying overages when you hit the limit regularly. So the real question is not "what do I send today" but "what does my busiest month look like, plus some headroom".</p>
<h2>Step 1: Pull your real monthly volume</h2>
<p>Do not guess. Count what you actually sent for the last six months. Most teams already have it in one of these places:</p>
<ul>
<li>The provider's own statistics dashboard (sends per month).</li>
<li>Your application logs, if you log each send call.</li>
<li>Your job queue, if emails go through a worker.</li>
</ul>
<p>Look for the peak month, not the average. Black Friday receipts, a product launch or a password-reset wave after a security notice can all push one month well above the rest.</p>
<h2>Step 2: Run the tier picker</h2>
<p>Paste your six monthly totals into this script. It adds 20% headroom to your busiest month and returns the cheapest plan that covers it. Prices are hard-coded from the table above, so update them when the pricing page changes.</p>
<pre><code class="language-js">// Monthly list prices read from SendGrid's pricing page on 2026-11-21 (USD).
// cap = emails included per month. Overage pricing is not modelled.
const plans = [
  { vendor: "SendGrid", plan: "Essentials 50k", cap: 50_000, price: 19.95 },
  { vendor: "SendGrid", plan: "Essentials 100k", cap: 100_000, price: 34.95 },
  { vendor: "SendGrid", plan: "Pro 100k", cap: 100_000, price: 89.95 },
  { vendor: "SendGrid", plan: "Pro 300k", cap: 300_000, price: 249.0 },
  { vendor: "SendGrid", plan: "Pro 700k", cap: 700_000, price: 499.0 },
  { vendor: "SendGrid", plan: "Pro 1.5M", cap: 1_500_000, price: 799.0 },
  { vendor: "SendGrid", plan: "Pro 2.5M", cap: 2_500_000, price: 1099.0 },
];

// Pick the cheapest plan whose cap covers your busiest month plus headroom.
function pickPlan(monthlyVolumes, { headroom = 0.2, needs = () =&gt; true } = {}) {
  const peak = Math.max(...monthlyVolumes);
  const target = Math.ceil(peak * (1 + headroom));
  const fits = plans.filter((p) =&gt; p.cap &gt;= target &amp;&amp; needs(p));
  fits.sort((a, b) =&gt; a.price - b.price);
  return { peak, target, best: fits[0] ?? null };
}

// Example: last six months of sends, from your own logs.
const lastSixMonths = [61_000, 58_500, 64_200, 70_100, 66_800, 91_300];
console.log(pickPlan(lastSixMonths));
// Need dedicated IPs? Only Pro plans include them.
console.log(pickPlan(lastSixMonths, { needs: (p) =&gt; p.plan.startsWith("Pro") }));
</code></pre>
<p>With the example numbers (a 91,300 peak), the target becomes 109,560 and the script answers Pro 300k at $249. Drop the headroom to 5% and the answer flips back to Essentials 100k at $34.95. That one setting is a $214-a-month decision, so choose it on purpose.</p>
<p>To compare providers, add their plans to the same array with the same fields. Our own <a href="https://emaildigit.com/for-developers">transactional email API priced by monthly volume</a> lists a Scale plan at $49 a month for 100,000 emails and a Growth plan at $199 for 500,000 on the <a href="https://emaildigit.com/pricing">pricing page</a> (read November 21, 2026), so you would add <code>{ vendor: "Email Digit", plan: "Scale", cap: 100_000, price: 49 }</code> and <code>{ vendor: "Email Digit", plan: "Growth", cap: 500_000, price: 199 }</code>.</p>
<h2>Step 3: Check what the price does not show</h2>
<p>A cheaper tier is only cheaper if your code does not need what it leaves out. Before you switch plans or providers, run this checklist:</p>
<ul>
<li><input disabled type="checkbox" /> <strong>Client libraries.</strong> SendGrid lists comprehensive client libraries. Some providers, including Email Digit, offer a REST API and webhooks only, with no SDKs. Count the wrapper code you would own.</li>
<li><input disabled type="checkbox" /> <strong>Dedicated IP.</strong> On SendGrid it comes with Pro, not Essentials. If you send under 100,000 a month, a shared pool is normal.</li>
<li><input disabled type="checkbox" /> <strong>Webhooks.</strong> How many event endpoints do you need? Essentials lists 2, Pro 5.</li>
<li><input disabled type="checkbox" /> <strong>Teammates and SSO.</strong> Pro adds both. Essentials is built for a very small team.</li>
<li><input disabled type="checkbox" /> <strong>Retries without duplicates.</strong> If your queue retries a failed call, can the provider ignore the second one? An idempotency key makes that safe; see <a href="https://emaildigit.com/guides/idempotent-transactional-email-api">how to retry a transactional email without sending it twice</a>.</li>
<li><input disabled type="checkbox" /> <strong>Authentication.</strong> Whoever sends must sign with DKIM for your domain and pass DMARC, or Gmail may reject bulk mail outright.</li>
</ul>
<h2>Common mistakes</h2>
<ul>
<li><strong>Sizing on the average month.</strong> Your bill is decided by the busy month.</li>
<li><strong>Forgetting marketing mail.</strong> If newsletters run through the same account, they count toward the same cap.</li>
<li><strong>Ignoring overage pricing.</strong> The FAQ says overages may apply. Read your plan's details before you plan to live above the cap.</li>
<li><strong>Switching mid-peak.</strong> Moving providers in late November means warming a new sending setup while volume is at its highest. Plan the move for a quiet month.</li>
</ul>
<h2>FAQ</h2>
<p><strong>Is there a free SendGrid plan?</strong>
The pricing page lists a free trial: $0 for 60 days, 100 emails a day, no credit card.</p>
<p><strong>What does SendGrid Essentials include?</strong>
50,000 or 100,000 emails a month ($19.95 or $34.95), analytics, 1 extra teammate, 2 event webhooks and the dynamic template editor, per the pricing page.</p>
<p><strong>When is Pro worth it?</strong>
When you need more than 100,000 emails a month, a dedicated IP, SSO or subusers. If you only need volume, compare other providers' plans at your target number first.</p>
<p><strong>How often should I re-check?</strong>
Whenever the bill changes or the pricing page does. Keep the prices in the script dated, as above.</p>
<hr />
<p><em>Written by the Email Digit team. Email Digit runs a transactional email API with managed SPF, DKIM and DMARC: <a href="https://emaildigit.com">emaildigit.com</a>. Prices were read from each vendor's own site on November 21, 2026 and can change. Drafted with AI assistance and checked against the sources linked above.</em></p>
]]></content:encoded></item><item><title><![CDATA[Retry a Password Reset Email Without Sending It Twice: Idempotency Keys in Practice]]></title><description><![CDATA[Picture this: your app calls an email API to send a password reset. The request reaches the server, the email is queued, and then the response vanishes: a…]]></description><link>https://emaildigit.hashnode.dev/retry-a-password-reset-email-without-sending-it-twice-idempotency-keys-in-practice</link><guid isPermaLink="true">https://emaildigit.hashnode.dev/retry-a-password-reset-email-without-sending-it-twice-idempotency-keys-in-practice</guid><category><![CDATA[email]]></category><dc:creator><![CDATA[Sohail Malik]]></dc:creator><pubDate>Thu, 19 Nov 2026 22:46:18 GMT</pubDate><content:encoded><![CDATA[<p>Picture this: your app calls an email API to send a password reset. The request reaches the server, the email is queued, and then the response vanishes: a timeout, a dropped connection, a deploy that restarts your worker. From your code's point of view the call failed, so it does the sensible thing and retries. The server sees a second, brand new request. Now your user has two reset emails with two different links and a creeping suspicion that something is wrong.</p>
<p>This post is about the fix: <strong>idempotency keys for transactional email</strong>. It follows the approach in Email Digit's own guide, <a href="https://emaildigit.com/guides/idempotent-transactional-email-api">retry a transactional email without sending it twice</a>, which I read on 2026-11-19, and adds a retry wrapper you can adapt.</p>
<h2>Why retrying sends duplicates</h2>
<p>Removing retries swaps duplicates for lost mail, which is worse. The real fix is to make a retry <em>recognisable</em>. If the server can tell that request two is the same intent as request one, it can answer with the first result instead of sending again.</p>
<h2>Step 1: Decide the key from your data, before the first attempt</h2>
<p>An idempotency key names the intent: "the reset email for reset request 8412". It has to come from your data, not from the HTTP call, so every retry produces the same one.</p>
<table>
<thead>
<tr>
<th>Key</th>
<th>Safe?</th>
<th>Why</th>
</tr>
</thead>
<tbody><tr>
<td>`pwreset-8412› (the reset request id)</td>
<td>Yes</td>
<td>Every retry of that reset carries the same key</td>
</tr>
<tr>
<td>`receipt-order-5531›</td>
<td>Yes</td>
<td>One receipt per order, however many times the job runs</td>
</tr>
<tr>
<td>A random UUID created at call time</td>
<td>No</td>
<td>A retry makes a new UUID, so it looks like a new email</td>
</tr>
<tr>
<td>The recipient's address</td>
<td>No</td>
<td>Their second, legitimate reset next month would look like a repeat</td>
</tr>
</tbody></table>
<p>A random UUID is fine if you create it once, store it with the event and read it back on retry. The rule is: decided before the first attempt, never regenerated.</p>
<h2>Step 2: Send the request with the key</h2>
<p>With Email Digit, one POST sends the email: a trigger key for the journey to run, the recipient, the variables and the idempotency key.</p>
<pre><code class="language-bash">curl -X POST https://api.emaildigit.com/api/transactional/send \
  -H "Authorization: Bearer $ED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "trigger_key": "password_reset",
    "to": "ana@example.com",
    "variables": { "name": "Ana", "action_url": "https://example.com/reset/8412" },
    "idempotency_key": "pwreset-8412"
  }'
</code></pre>
<p>It answers <code>202 Accepted›. Per the guide, a repeat with the same key and the same payload sends no new email: the response has status </code>duplicate› and the original message ids. The same key with a different payload is refused with `409›, which is nearly always a bug in the caller.</p>
<h2>Step 3: Retry only when the outcome is unknown</h2>
<p>Not every error deserves a retry. This is the table from the guide, condensed:</p>
<table>
<thead>
<tr>
<th>Response</th>
<th>Meaning</th>
<th>Retry?</th>
</tr>
</thead>
<tbody><tr>
<td>202, status `suppressed›</td>
<td>Address hard bounced or complained before; nothing sent</td>
<td>No</td>
</tr>
<tr>
<td>404</td>
<td>No journey has that trigger key</td>
<td>No, fix the key</td>
</tr>
<tr>
<td>409</td>
<td>Journey not active or has no steps, or key reused with a new payload</td>
<td>No, fix the cause</td>
</tr>
<tr>
<td>422</td>
<td>Missing recipient, or sending domain not verified yet</td>
<td>No</td>
</tr>
<tr>
<td>403</td>
<td>API key lacks the `email:send› scope</td>
<td>No</td>
</tr>
<tr>
<td>Timeout or 5xx</td>
<td>Outcome unknown</td>
<td>Yes, with the same key</td>
</tr>
</tbody></table>
<h2>Step 4: A small retry wrapper</h2>
<pre><code class="language-javascript">async function sendReset(resetId, to, actionUrl) {
  const body = {
    trigger_key: "password_reset",
    to,
    variables: { action_url: actionUrl },
    idempotency_key: `pwreset-${resetId}` ,
  };
  for (let attempt = 1; attempt &lt;= 4; attempt++) {
    try {
      const res = await fetch("https://api.emaildigit.com/api/transactional/send", {
        method: "POST",
        headers: {
          Authorization: `Bearer ${process.env.ED_API_KEY}` ,
          "Content-Type": "application/json",
        },
        body: JSON.stringify(body),
      });
      if (res.status === 202) return await res.json();
      if (res.status &lt; 500) throw new Error(`Do not retry: ${res.status}` );
    } catch (err) {
      if (err.message.startsWith("Do not retry")) throw err;
    }
    await new Promise(r =&gt; setTimeout(r, 2 ** attempt * 250)); // 500ms, 1s, 2s, 4s
  }
  throw new Error("Email API unreachable after retries");
}
</code></pre>
<p>The important line is the key: it is built from <code>resetId›, so attempt four carries exactly the same key as attempt one. A network error (the </code>catch› branch) and a 5xx both fall through to another attempt; anything else under 500 stops immediately.</p>
<h2>Common mistakes</h2>
<ul>
<li><strong>Generating the key inside the retry loop.</strong> Every attempt becomes a new email.</li>
<li><strong>Building the key from the user id.</strong> Two genuine resets a month apart collide, and the second is refused with a 409.</li>
<li><strong>Retrying a 4xx.</strong> A 404 or 422 will fail every time; fix the cause.</li>
<li><strong>Renaming the trigger key.</strong> Per the guide, once a trigger key has been used it is locked in the dashboard so a tidy-up cannot silently break your code. To move to a new key, create a new journey, switch your code over, then archive the old one.</li>
<li><strong>Assuming a key expires.</strong> Email Digit does not publish a time after which a key may be reused, so treat keys as permanent.</li>
</ul>
<h2>Test it without sending real mail</h2>
<p>The guide notes that a test key records the send in the message log without delivering it, and that test and live keys keep separate sets of idempotency keys. That lets you wire up the integration against a draft journey and prove that a repeated call comes back as `duplicate›.</p>
<h2>FAQ</h2>
<p><strong>What is an idempotency key?</strong> A string that names one intended action, so a repeated request can be recognised and answered with the first result.</p>
<p><strong>Does it stop two different emails?</strong> No. Two genuine resets a minute apart have two keys and send two emails, which is correct.</p>
<p><strong>Where do I start with Email Digit?</strong> The <a href="https://emaildigit.com/for-developers">developer page</a> has the quickstart, and developer plans start at $49 a month. Every account gets 15 free days with 3,000 emails and no card.</p>
<hr />
<p><em>Written by the team at <a href="https://emaildigit.com">Email Digit</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[How to Send Transactional Email From Your App: A Step-by-Step Guide (No Duplicates, No Spam Folder)]]></title><description><![CDATA[Step by step: authenticate your domain, split test and live keys, add idempotency keys, retry the right errors and verify webhooks.]]></description><link>https://emaildigit.hashnode.dev/how-to-send-transactional-email-from-your-app-a-step-by-step-guide-no-duplicates-no-spam-folder</link><guid isPermaLink="true">https://emaildigit.hashnode.dev/how-to-send-transactional-email-from-your-app-a-step-by-step-guide-no-duplicates-no-spam-folder</guid><category><![CDATA[email]]></category><category><![CDATA[api]]></category><category><![CDATA[backend]]></category><dc:creator><![CDATA[Sohail Malik]]></dc:creator><pubDate>Sat, 14 Nov 2026 05:27:45 GMT</pubDate><content:encoded><![CDATA[<p>Picture it: it's launch week. Signups are flowing, the dashboard is green, and then support pings you. "Three people say they got the welcome email twice. One says they got it four times. And the CEO's password reset went to spam." Your transactional email worked perfectly in staging. Production had other plans.</p>
<p>Transactional email (password resets, receipts, magic links, invites) looks like the easy part of email. One API call, done. In practice it fails in a few very predictable ways: duplicates on retry, mail in spam because the domain was never authenticated, staging emailing real customers, and webhooks nobody verifies. This is a step-by-step guide to sending transactional email from your app without those surprises.</p>
<h2>Step 1: Give transactional mail its own lane</h2>
<p>Before any code, decide where these emails come from. Keep them separate from marketing campaigns, ideally on their own stream or subdomain (for example <code>mail.yourapp.com</code> for product mail, <code>news.yourapp.com</code> for newsletters). If a promotion annoys people and the complaints pile up, you don't want your password resets paying for it.</p>
<h2>Step 2: Authenticate the sending domain first</h2>
<p>Receivers judge your mail on SPF, DKIM and DMARC before they read a word of it. For a transactional sender that means:</p>
<ol>
<li><strong>SPF</strong>: one record on the sending domain that includes your provider. One record only, and under 10 DNS lookups in total.</li>
<li><strong>DKIM</strong>: your provider signs mail with a key published under your domain, so the signature aligns with your From address.</li>
<li><strong>DMARC</strong>: a policy record, starting at <code>p=none</code> with reporting, tightened once reports show every legitimate sender passing.</li>
</ol>
<p>Check each one before launch day, for example with a free <a href="https://emaildigit.com/tools/dkim-checker">DKIM record checker</a>. Ten minutes here saves a week of "why is the reset email in junk?"</p>
<h2>Step 3: Separate test and live keys</h2>
<p>The scariest transactional bug is staging emailing a real customer because someone copied a production database. The fix is structural, not a reminder in the README:</p>
<ul>
<li>Use <strong>separate API keys</strong> for test and live, ideally with prefixes you can recognise at a glance.</li>
<li>Make the <strong>test key physically unable to deliver</strong>. It should render and record the email, then stop.</li>
<li>Load the key from the environment, and fail loudly at startup if a live key appears outside production.</li>
</ul>
<h2>Step 4: Make every send idempotent</h2>
<p>Networks time out. Queues redeliver. Your worker crashes after the API accepted the request but before it saved "sent". If your retry simply calls the API again, the user gets the email twice, or four times, depending on how enthusiastic your retry policy is.</p>
<p>The fix is an idempotency key: a stable ID for "this email, for this event", sent with every request. A replay with the same key should return the original result instead of sending again. Derive it from the event, never from the attempt:</p>
<pre><code class="language-js">// One key per (email type, business event). Same event, same key, every retry.
function idempotencyKey(type, eventId) {
  return `${type}:${eventId}`; // e.g. "password_reset:req_8f21c"
}

async function sendTransactional({ type, to, variables, eventId }) {
  const res = await fetch('https://api.example-email-provider.com/send', {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${process.env.EMAIL_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      template: type,
      to,
      variables,
      idempotency_key: idempotencyKey(type, eventId),
    }),
  });
  if (res.status &gt;= 500 || res.status === 429) {
    throw new RetryableError(`provider returned ${res.status}`);
  }
  if (!res.ok) {
    throw new PermanentError(`provider returned ${res.status}`);
  }
  return res.json();
}
</code></pre>
<p>(<code>RetryableError</code> and <code>PermanentError</code> are your own error classes; the point is that the queue retries only the first kind.) If your provider doesn't support idempotency keys at all, that's worth knowing before you pick it. Here is a deeper look at <a href="https://emaildigit.com/guides/idempotent-transactional-email-api">how to retry a transactional email without sending it twice</a>.</p>
<h2>Step 5: Retry the right failures, with backoff</h2>
<p>Not every error deserves a second attempt:</p>
<table>
<thead>
<tr>
<th>Response</th>
<th>What it usually means</th>
<th>Retry?</th>
</tr>
</thead>
<tbody><tr>
<td>Timeout / connection reset</td>
<td>Unknown: it may have been accepted</td>
<td>Yes, with the same idempotency key</td>
</tr>
<tr>
<td>429</td>
<td>You're sending too fast</td>
<td>Yes, after the delay the provider asks for</td>
</tr>
<tr>
<td>5xx</td>
<td>Provider-side problem</td>
<td>Yes, with exponential backoff and a cap</td>
</tr>
<tr>
<td>4xx (validation, bad address, suppressed)</td>
<td>Your request is wrong or the address can't be mailed</td>
<td>No: log it and fix the cause</td>
</tr>
</tbody></table>
<p>Cap the attempts and send the leftovers to a dead-letter queue someone actually looks at. "Retry forever" is how a bad deploy turns into a very bad afternoon.</p>
<h2>Step 6: Respect suppressions</h2>
<p>Hard bounces and spam complaints should never be mailed again. Many providers keep a suppression list and refuse those sends; make sure your code treats that refusal as final, not as an error to retry. And never use a transactional stream to slip marketing past someone who unsubscribed. Receipts, yes. "Since you're here, 20% off" in the receipt, think twice.</p>
<h2>Step 7: Verify webhooks before you trust them</h2>
<p>Delivery, bounce and complaint events usually come back as webhooks. Treat them like any other untrusted input:</p>
<ol>
<li><strong>Verify the signature</strong> on the raw request body before parsing it.</li>
<li><strong>Reject old timestamps</strong>, so a captured request can't be replayed later.</li>
<li><strong>Make the handler idempotent</strong> too: providers retry webhooks, so the same event can arrive twice.</li>
<li><strong>Return 2xx fast</strong> and do the work on a queue.</li>
</ol>
<p>Here is a full walkthrough on <a href="https://emaildigit.com/guides/verify-and-replay-email-webhooks">how to verify, retry and replay email webhooks safely</a>.</p>
<h2>Launch-day checklist</h2>
<ul>
<li><input disabled type="checkbox" /> Transactional mail on its own stream or subdomain</li>
<li><input disabled type="checkbox" /> SPF, DKIM and DMARC published and passing</li>
<li><input disabled type="checkbox" /> Test key can't deliver; live key only in production</li>
<li><input disabled type="checkbox" /> Every send carries an idempotency key derived from the event</li>
<li><input disabled type="checkbox" /> Retries only on timeouts, 429 and 5xx, with backoff and a cap</li>
<li><input disabled type="checkbox" /> Suppressed addresses treated as final</li>
<li><input disabled type="checkbox" /> Webhook signatures and timestamps verified</li>
<li><input disabled type="checkbox" /> A searchable log of every send, so "did it go out?" takes seconds</li>
</ul>
<h2>Common mistakes</h2>
<ul>
<li><strong>Idempotency key built from a timestamp or attempt number.</strong> Every retry gets a new key, so nothing is deduplicated.</li>
<li><strong>Retrying 4xx errors.</strong> A bad address will still be a bad address on attempt 5.</li>
<li><strong>Templates compiled into the app.</strong> Fixing a typo in the receipt now needs a deploy. Keeping templates with the provider lets non-engineers fix copy safely.</li>
</ul>
<h2>FAQ</h2>
<p><strong>What's the difference between transactional and marketing email?</strong> Transactional email is triggered by something the user did (reset, purchase, signup) and is expected. Marketing email is sent to a list on your schedule. Keep them on separate streams.</p>
<p><strong>Do I need a dedicated IP for transactional email?</strong> Usually not at low or uneven volume. Authentication, clean sending and a good shared pool matter more.</p>
<p><strong>Which transactional email APIs support idempotency keys?</strong> Support varies, so check the API docs before you commit. For example, <a href="https://emaildigit.com/for-developers">Email Digit's transactional email API for developers</a> takes an <code>idempotency_key</code> on the send call, sandboxes everything sent with test keys, signs and retries webhooks, and manages SPF, DKIM and DMARC.</p>
<hr />
<p><em>I work on</em> <a href="https://emaildigit.com"><em>Email Digit</em></a><em>. The code above is provider-agnostic; swap in your provider's endpoint and field names. Drafted with AI assistance and checked against the linked guides.</em></p>
]]></content:encoded></item></channel></rss>