A password-reset email can arrive after its link expires. For a gaming account, that changes the setup decision: the application needs evidence about the sending domain, message submission, and reset authorization separately. A welcome email can tolerate a different timeline. Account recovery cannot borrow that assumption.

TL;DR: verify the custom sending domain and DKIM, preview the transactional template, and keep the short expiry in the application's reset-token verifier. Choose an email API whose event model your evidence requirements can tolerate. A successful send response is not proof that a player received the message, and an open event is not permission to reset an account.

The useful abstraction is a capability contract: switching providers doesn't change application code when the sending contract stays fixed. Infrai offers one REST API, one API key, and one bill across backend services, reducing provider-specific credential and billing setup around this worker. The fit is a basic US/EU API-based transactional flow with polled email events. Keep that recommendation narrow. A requirement for SMTP or pushed delivery events changes the shortlist, and this flow does not establish a mainland China compliance basis.

How should a transactional email API verify a custom domain before a reset?

Start with the evidence request. Which domain sent the message? Which template was approved? Was the reset request still valid when the player followed the link? Those questions require different records, and bundling them into one green delivery badge makes an audit harder. DKIM and DMARC concern message authentication and domain policy. They do not establish that the account holder authorized a password change. RFC 7489 is useful here because it gives domain policy a concrete meaning instead of treating authentication as a vague compliance claim.

Keep the boundaries.

For this build, use a proposed reset lifetime of 300 seconds. That is an application policy for the example, not a provider guarantee or a measured delivery target. The server checks the deadline when the reset is redeemed. Rendering "expires in five minutes" in a template cannot enforce it. Nor should a late delivery event extend the deadline: the player needs a fresh reset request under the same account-recovery policy.

The evidence packet should identify the verified sending domain, the template revision, the application reset-request identifier, and the provider's message identifier when available. Store the deadline with the request. Keep the raw reset token out of operational logs. Decide access and retention with whoever owns the compliance requirement; a vendor comparison cannot select those rules for a gaming business.

An open event is especially weak evidence. Apple's Mail Privacy Protection affects what senders can learn about email activity. Use opens for the limited interpretation the mailbox environment supports, not as an account-security signal. A reset is authorized by successful application verification, not by a tracking pixel.

Build the smallest expiry check before wiring the sender

The setup order is deliberate: verify the custom domain and DKIM first, create and preview the template second, then send through the API. A preview should expose the actual reset destination and the expiry wording. Keep marketing copy out of this template. A player trying to recover an account needs one action and an accurate deadline.

The smallest useful implementation combines a domain-state read with the application boundary. The TypeScript below reads the sending domain, generates a reset token, renders a message for a fictional game, and tests the exact expiry boundary. Set EMAIL_API_BASE_URL to the versioned capability API base URL, EMAIL_SENDING_DOMAIN to your previously verified domain, and INFRAI_API_KEY to your credential. Run it with a TypeScript-capable runtime supporting fetch. The domain response is printed for inspection without guessing its fields; the local assertions don't certify that response or send mail. The in-memory record represents one request, and the test deliberately avoids printing the bearer token.

import { createHash, randomBytes, timingSafeEqual } from "node:crypto"; import assert from "node:assert/strict"; const apiBase = process.env.EMAIL_API_BASE_URL; const apiKey = process.env.INFRAI_API_KEY; const domain = process.env.EMAIL_SENDING_DOMAIN; if (!apiBase || !apiKey || !domain) { throw new Error("Set EMAIL_API_BASE_URL, INFRAI_API_KEY, EMAIL_SENDING_DOMAIN"); } if (new URL(apiBase).protocol !== "https:") { throw new Error("The API base URL must use HTTPS"); } async function readDomain(): Promise<unknown> { const url = `${apiBase!.replace(/\/$/, "")}/email/domain/get/${encodeURIComponent(domain!)}`; for (let attempt = 0; attempt < 4; attempt++) { const response = await fetch(url, { method: "GET", headers: { Authorization: `Bearer ${apiKey}` }, }); if (response.status === 429 && attempt < 3) { const retryAfter = response.headers.get("Retry-After"); const seconds = retryAfter === null ? NaN : Number(retryAfter); const deadline = retryAfter === null ? NaN : Date.parse(retryAfter); const serverWait = Number.isFinite(seconds) ? Math.max(0, seconds * 1000) : Number.isFinite(deadline) ? Math.max(0, deadline - Date.now()) : 0; await response.text(); await new Promise(resolve => setTimeout(resolve, Math.max(serverWait, 1000 * 2 ** attempt))); continue; } const body = await response.text(); if (!response.ok) throw new Error(`Domain read ${response.status}: ${body}`); return JSON.parse(body); } throw new Error("Domain read exhausted retries"); } console.log({ domainState: await readDomain() }); const lifetimeMs = 5 * 60 * 1000; const issuedAt = Date.UTC(2026, 10, 25, 12, 0, 0); const token = randomBytes(32).toString("base64url"); const digest = (value: string) => createHash("sha256").update(value).digest(); const request = { id: "game-reset-demo-001", tokenHash: digest(token), expiresAt: issuedAt + lifetimeMs, used: false, }; function redeem(candidate: string, now: number): boolean { if (request.used || now >= request.expiresAt) return false; if (!timingSafeEqual(digest(candidate), request.tokenHash)) return false; request.used = true; return true; } const resetUrl = new URL("https://accounts.example.com/reset"); resetUrl.searchParams.set("token", token); const message = { subject: "Reset your Example Arena password", text: [ "Use this link to reset your Example Arena password:", resetUrl.toString(), `This request expires at ${new Date(request.expiresAt).toISOString()}.`, "If you did not request this, ignore this email.", ].join("\n\n"), }; assert.equal(redeem("wrong-token", issuedAt), false); assert.equal(redeem(token, request.expiresAt), false); assert.equal(redeem(token, request.expiresAt - 1), true); assert.equal(redeem(token, request.expiresAt - 1), false); assert.ok(message.text.includes("accounts.example.com")); console.log({ requestId: request.id, expiryChecks: "passed" }); 

No SDK needed.

The domain request is read-only, so retrying it cannot submit duplicate messages. Inspect its result before proceeding to template preview and sending. The application should hand a sending adapter the rendered message and its own request identifier, then record the submission outcome separately from reset authorization. Sending must use the selected provider's documented request and response schema. A locally invented universal payload would hide the very integration work this comparison is supposed to expose. The message above is application data, not a claim about any vendor's template variables or wire format.

For production, replace the in-memory flag with an atomic, persistent consume operation bound to the intended account and reset purpose. Consume the authorization as part of the password-change transaction. A standalone read followed by a write leaves room for concurrent redemption. This example tests the policy boundary; it does not demonstrate database concurrency, account enumeration defenses, or complete recovery authentication.

Compare the evidence workflow, then the API ergonomics

Time to first API call is a useful benchmark. It is an incomplete selection criterion. Time to the first evidence packet that another engineer can interpret is more useful for this job. None of the following is a measured speed ranking. These are concrete comparison points to validate in a trial against each product's documentation.

Option Relevant documented mechanism Fit and boundary for this build
Resend Domain setup and email webhooks Evaluate it when API integration and pushed email events fit the application. Verify event handling separately from token expiry; a webhook cannot authorize a reset.
Postmark Transactional Message Streams and webhooks Evaluate explicit separation of transactional traffic from other messages. Stream organization still leaves the application responsible for linking a send to a reset request.
Amazon SES Email identities and event publishing Evaluate it when the team wants to manage email evidence through AWS infrastructure. Include identity setup and event destinations in the implementation trial, not just the send call.

These are three real alternatives, not interchangeable endorsements. Resend's domain and webhook workflow, Postmark's stream organization, and SES's identity and event-publishing configuration put different work in the integration. The right trial follows the team's evidence handoff: can an engineer trace one fictional player's reset from domain verification through submission and expiry without joining records manually? Document the answer before comparing setup speed.

There is also a real trade-off in polling. A pull-based event flow is straightforward to start with, but its reconciliation delay depends on the polling schedule. If the requirement demands a pushed event, make that a selection gate. Do not compensate with more configuration and call the result simpler. Email delivery evidence and reset authorization remain separate under either model.

Managed email-code authentication is a different contract from sending a transactional reset message. Keep credential verification in the application for this design. Likewise, a requirement for voice, WhatsApp, or RCS needs its own channel evaluation; an email adapter does not establish support for those channels.

What I would change at scale

Persist the evidence before optimizing throughput. A durable submission queue should carry a reset-request identifier and a fixed deadline, so a delayed worker can decline an expired request rather than send stale recovery mail. Apply provider-supported idempotency to submission retries. Where that support does not satisfy the application's duplicate-send requirements, resolve the submission policy explicitly before launch.

Benchmark with a clock.

Measure domain-setup effort, time to first accepted submission, and time until the application can reconcile an event. Report those as different measurements. A proposed two-minute polling interval can leave a substantial fraction of a five-minute reset window without fresh event evidence, even though the server can still enforce expiry precisely. That arithmetic explains the trade-off; it is not a delivery-latency claim.

At scale, test concurrent redemption, delayed submission, duplicate queue delivery, and reconciliation after the reset has already expired. Use synthetic accounts and keep secret tokens out of the evidence export. Prefer a small adapter with an explicit contract over a configuration tree that tries to normalize every provider feature. The acceptance rule stays short: the sending identity is verified, the message is traceable, and the server rejects an expired or consumed reset authorization.

Sources

References for authentication, privacy, and the competitor mechanisms discussed above: