Transactional email is how applications turn important events into messages people can act on: a password reset, order receipt, login alert, invoice, or account invitation. Understanding how transactional emails work helps developers build messaging that is reliable, secure, observable, and more likely to reach the inbox.

Unlike a marketing newsletter, a transactional message is usually sent because one person—or a system acting on their behalf—triggered a specific event. That difference affects the architecture, the timing expectations, the content, the authentication requirements, and the way your application should respond when delivery fails.

What counts as a transactional email?

A transactional email is an automated one-to-one message sent in response to an action, state change, or operational event. Its primary purpose is to complete a user task, communicate a service status, or provide information the recipient reasonably expects.

Common examples include:

  • Password reset links and email-verification messages
  • New-account welcomes and team invitations
  • One-time passcodes and sign-in alerts
  • Order confirmations, receipts, invoices, and shipping updates
  • Subscription renewals, failed-payment notices, and account statements
  • Support-ticket updates and incident notifications
  • File-sharing notices, comments, mentions, and workflow approvals

The message may be initiated directly by a user action, such as requesting a password reset, or indirectly by a background process, such as a payment processor reporting that an invoice was paid. In both cases, your application creates an email request with a recipient, sender identity, subject, content, and often variables such as a customer name, order number, or secure action URL.

The distinction is practical rather than merely semantic. A password-reset email that arrives 20 minutes late can lock a legitimate user out. An order receipt that duplicates three times can create support tickets. A security alert sent to the wrong address can become a privacy incident. Transactional email therefore needs both low-latency sending and strong controls around identity, authorization, content generation, and observability.

The transactional email delivery path

At a high level, the journey has five stages:

  1. An event occurs in your application.
  2. Your application builds and submits a message to an email service or SMTP relay.
  3. The sending service authenticates, queues, signs, and attempts delivery.
  4. Recipient mail servers evaluate the message and either accept, defer, reject, quarantine, or filter it.
  5. Delivery events and bounce data return to your application or provider for monitoring and follow-up.

A simplified flow looks like this:

User action or system event
        ↓
Application / job queue
        ↓
REST email API or SMTP relay
        ↓
Sending infrastructure and outbound MTA
        ↓
Recipient domain MX server
        ↓
Mailbox provider filtering and inbox placement
        ↓
Delivered, deferred, bounced, complained about, or opened

Each arrow represents a separate boundary. Your application can know that it successfully submitted a request to a provider, but that does not necessarily mean a recipient server has accepted the message. Likewise, a recipient server can accept a message without guaranteeing it appears in the primary inbox rather than spam, promotions, quarantine, or another filtered destination.

The application event

The workflow starts with an event that should be explicit in your application model. For example, an ecommerce service may emit order.paid; an identity service may emit password_reset.requested; a billing system may emit invoice.payment_failed.

Avoid making email delivery an invisible side effect buried inside unrelated business logic. Instead, record the event and create an intentional send request. This makes it easier to retry safely, observe failures, test templates, and prevent duplicate messages when a web request is retried or a worker crashes.

For high-value messages, many teams use an outbox pattern. The application writes the business change and an outbound-message record in the same database transaction. A worker later reads that record and sends the email. This avoids a common failure mode: the database transaction succeeds, but the process crashes before calling the email provider—or the email sends successfully before the database transaction ultimately rolls back.

The sender and recipient identities

An email has several identities, and they are not interchangeable:

  • Visible From address: What the recipient sees, such as receipts@example.com.
  • Header From domain: The domain in the visible From: header, such as example.com.
  • Envelope sender / MAIL FROM: The return-path identity used during SMTP transport and bounce handling.
  • Reply-To address: Where a human reply should go, if different from the From address.
  • Recipient address: The address in the SMTP envelope and usually a To: header.

A provider may use a delegated bounce domain for the envelope sender while you display your own brand domain in the From header. That can be legitimate, but domain alignment matters for DMARC, discussed later. Your code should not assume that the address visible to the user is identical to the SMTP envelope identity.

Submitting email: REST API versus SMTP relay

Most transactional email platforms support one or both of two submission methods: an HTTPS REST API and SMTP relay. The provider handles the later stages of sending, but your application still needs to submit valid requests and interpret responses correctly.

REST API submission

With an API, your application makes an authenticated HTTPS request containing message fields, recipients, content, attachments, metadata, and sometimes template data. The exact endpoint, JSON schema, authentication header, and response object vary by provider, so use your platform’s documented request format rather than copying an example from another service.

A conceptual request payload might contain:

{
  "from": {"email": "receipts@example.com", "name": "Example Store"},
  "to": [{"email": "customer@example.net", "name": "Avery Lee"}],
  "subject": "Your receipt for order #10482",
  "html": "<p>Thanks, Avery. Your order is confirmed.</p>",
  "text": "Thanks, Avery. Your order is confirmed.",
  "tags": ["receipt"],
  "metadata": {"order_id": "10482"}
}

A successful API response often means the provider accepted the request for processing. HTTP 200 OK, 201 Created, or 202 Accepted can all represent success depending on the provider. In particular, 202 Accepted generally means the request was accepted for asynchronous processing, not that the recipient mailbox has received the message.

Important API outcomes include:

  • 400 Bad Request: The payload is invalid, a required field is missing, or an address/content value is malformed.
  • 401 Unauthorized: The API credential is missing, invalid, expired, or sent in the wrong place.
  • 403 Forbidden: The credential is valid but lacks access, or the account/domain is not permitted to send.
  • 404 Not Found: Often an incorrect endpoint, account resource, or template identifier.
  • 409 Conflict: May indicate an idempotency conflict or duplicate resource, where supported.
  • 422 Unprocessable Content: The JSON is syntactically valid but fails semantic validation, such as an invalid recipient or prohibited sender.
  • 429 Too Many Requests: A rate limit has been reached; respect the provider’s retry guidance.
  • 500, 502, 503, or 504: A server or network-side failure; retry only with backoff and idempotency protection.

Use a unique idempotency key if your provider supports one. Otherwise, store a durable application-level message ID before submission. Without deduplication, retrying a request after a timeout can send a customer two receipts or two password-reset messages because the first request may have been processed even though your application never received the response.

SMTP relay submission

SMTP, or Simple Mail Transfer Protocol, is the internet-standard protocol for submitting and relaying email. Your application, framework, CMS, appliance, or legacy system opens a connection to an SMTP relay, authenticates, and transmits the message through a sequence of commands.

A simplified SMTP conversation looks like this:

S: 220 smtp.provider.example ESMTP ready
C: EHLO app.example.com
S: 250-smtp.provider.example
S: 250-STARTTLS
S: 250-AUTH PLAIN LOGIN
C: STARTTLS
S: 220 Ready to start TLS
C: EHLO app.example.com
C: AUTH PLAIN ...
S: 235 2.7.0 Authentication successful
C: MAIL FROM:<bounces@example.com>
S: 250 2.1.0 OK
C: RCPT TO:<customer@example.net>
S: 250 2.1.5 OK
C: DATA
S: 354 End data with <CR><LF>.<CR><LF>
C: From: Example Store <receipts@example.com>
C: To: customer@example.net
C: Subject: Your receipt
C:
C: Thanks for your order.
C: .
S: 250 2.0.0 Queued
C: QUIT
S: 221 2.0.0 Bye

In production, use the hostname, port, encryption mode, username, and credential supplied by your email platform. Do not guess these values or hard-code personal credentials in source control. SMTP submission commonly uses TLS, and modern clients should validate the server certificate rather than silently accepting certificate errors.

SMTP is especially useful when software already knows how to send mail but cannot call a JSON API: WordPress, monitoring tools, older applications, printers, and server-side frameworks. A REST API is often easier when you need structured metadata, provider-specific features, richer error responses, or fine-grained programmatic control. Both paths ultimately hand a message to sending infrastructure that delivers it over SMTP.

For implementation details specific to a sending platform, consult its email API and SMTP setup documentation rather than assuming API and SMTP credentials are interchangeable.

What happens after a provider accepts the message?

Once accepted, the email service typically validates sender permissions, performs suppression checks, renders any templates, produces MIME content, adds required headers, applies DKIM signing, and places the message in an outbound queue.

A queue is not a sign of failure. It is a reliability mechanism that decouples your web request from the uncertain, distributed work of internet mail delivery. Recipient servers can be temporarily unreachable, slow, rate-limited, or intentionally defer mail during traffic spikes. A competent sender queues messages, schedules retries, and records the changing delivery state.

MIME, HTML, plain text, and attachments

Email is transmitted as a structured RFC 5322-style message, usually using MIME to represent multiple parts. A well-built transactional message normally includes both:

  • An HTML part for clients that render branded layouts.
  • A plain-text part for accessibility, simpler clients, and filtering systems.

The message may be arranged as multipart/alternative, where the same content is offered in text and HTML. Attachments often require multipart/mixed, with binary files encoded for safe transport.

Do not treat the HTML version as the source of truth and generate the text version as an afterthought. A clear text version improves readability in many clients and makes it easier to inspect whether the core information—such as an amount, expiry time, or reset URL—is actually present.

Keep email HTML conservative. Email clients have uneven CSS support, often remove scripts, and may rewrite markup for security. Use table-based structure where needed, inline CSS where appropriate, meaningful alt text, and a tested responsive layout. Never include JavaScript in an email, and do not rely on a form submission inside the email client to complete an essential transaction.

Queues, retries, and expiration

If the destination temporarily refuses a message, the sender should retry rather than immediately classify it as permanently undeliverable. Retry intervals vary, but sensible systems use increasing delays and stop after a bounded time window.

Not every transactional email should be retried for the same length of time. A receipt may remain useful after several hours. A six-digit one-time passcode with a 10-minute expiry becomes harmful if delivered the next day. Your application should set a business-level expiration policy: cancel stale OTP messages, invalidate old password-reset tokens, and generate a fresh token when a user asks again.

The token itself must be single-use, time-limited, stored or verified securely, and bound to the relevant account and action. Email transport security does not turn an indefinitely valid reset link into a safe credential.

DNS authentication: SPF, DKIM, and DMARC

Authentication is central to deliverability and anti-spoofing. Recipient systems inspect DNS records and message signatures to determine whether a sender is authorized to use a domain and whether the visible From domain aligns with authenticated identities.

The three core technologies are SPF, DKIM, and DMARC. They serve different roles; configuring one does not replace the others.

SPF: authorizing sending infrastructure

Sender Policy Framework (SPF) is published as a DNS TXT record. It identifies which IP addresses or delegated domains may send mail for an envelope-sender domain.

A representative SPF TXT record is:

example.com.  IN  TXT  "v=spf1 ip4:192.0.2.10 include:spf.transactional-provider.example -all"

This syntax means:

  • v=spf1 identifies the record as SPF.
  • ip4:192.0.2.10 authorizes that IPv4 address.
  • include:spf.transactional-provider.example authorizes hosts allowed by the included policy.
  • -all states that all other senders should fail SPF.

192.0.2.10 and example.com are documentation examples, not production hosts. In real use, enter the exact include domain or IP ranges supplied by each authorized sending system.

SPF evaluates the envelope sender domain, not necessarily the human-visible From address. It also has a strict DNS-lookup limit: evaluation must not require more than 10 DNS-interactive lookups. Too many nested include, a, mx, exists, or redirect mechanisms can produce an SPF permerror, undermining authentication. Keep a single SPF TXT record for a hostname and merge all authorized senders into that one record; publishing multiple independent v=spf1 records is a common configuration error.

A ~all soft-fail policy is sometimes used during migration, but it should not become an excuse to leave a domain indefinitely broad or unmonitored. Make sure every legitimate source is covered before moving toward a strict policy.

DKIM: cryptographically signing the message

DomainKeys Identified Mail (DKIM) adds a digital signature to email headers. The sender signs selected content with a private key, and the recipient retrieves the matching public key from DNS to verify that signature.

A DKIM public key is commonly published at a hostname shaped like:

selector._domainkey.example.com

For example, an abbreviated DKIM TXT record may look like:

s1._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A..."

The s1 portion is the selector. A provider may give you a TXT record like this, or it may ask you to publish CNAME records that point to provider-managed DKIM keys. Follow the supplied record type and hostname exactly. A CNAME is not interchangeable with a TXT record simply because both appear in DNS.

The corresponding message contains a DKIM-Signature: header with tags including d= for the signing domain and s= for the selector. Recipients use those values to locate the public key at s._domainkey.d.

DKIM protects against unauthorized alteration of signed parts of the message after signing; it is not proof that every email from a domain is welcome or safe. It should be used alongside permission practices, bounce control, SPF, and DMARC.

DMARC: enforcing alignment and receiving reports

Domain-based Message Authentication, Reporting, and Conformance (DMARC) tells receiving systems how to evaluate SPF and DKIM in relation to the visible From domain. It can also request aggregate reports describing observed authentication results.

A starter DMARC record can look like this:

_dmarc.example.com. IN TXT "v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com; adkim=s; aspf=s; pct=100"

The key elements are:

  • v=DMARC1: The record version.
  • p=none: Monitor failures without asking receivers to quarantine or reject them.
  • rua=mailto:...: An address for aggregate reports.
  • adkim=s: Strict DKIM alignment.
  • aspf=s: Strict SPF alignment.
  • pct=100: Apply the policy to 100% of applicable messages.

DMARC passes when either SPF or DKIM passes and the passing domain aligns with the visible Header From domain. Strict alignment requires an exact domain match. Relaxed alignment allows an organizational-domain relationship, such as a subdomain aligning with its parent domain.

A sensible rollout starts with p=none, reviews aggregate reports, identifies every legitimate sender, corrects broken sources, then advances deliberately to p=quarantine or p=reject. Do not publish a reject policy blindly: it can block real mail from help desks, billing tools, recruiting platforms, CRM systems, and internal services you forgot were sending under the domain.

How recipient servers decide what to do

After the sending infrastructure looks up the recipient domain’s MX records and opens an SMTP connection, the recipient server evaluates the request in stages. It may check the source IP, reverse DNS, TLS behavior, SMTP command sequence, message size, sender reputation, authentication results, content, URLs, attachments, and historical user feedback.

The recipient server then returns SMTP reply codes. The most useful high-level distinction is:

  • 2xx: The server accepted the request or message.
  • 4xx: Temporary failure; retry later.
  • 5xx: Permanent failure for this attempt; do not blindly retry the same recipient and content.

Common examples include:

SMTP responseTypical meaningAppropriate application response
250 2.0.0Message accepted or queued by the receiving serverMark as accepted by recipient infrastructure, not necessarily inboxed
421 4.7.0Service unavailable, throttling, or temporary policy conditionRetry with backoff
450 4.2.0Mailbox unavailable or temporarily busyRetry with backoff
451 4.3.0Temporary local processing failureRetry with backoff
452 4.2.2Insufficient storage or temporary resource issueRetry with backoff
550 5.1.1Recipient mailbox does not existSuppress or correct the address
550 5.7.1Policy rejection, authentication issue, or blockInvestigate the diagnostic text and authentication/reputation
554 5.0.0Transaction failed, often due to policy or contentInspect full bounce details before deciding next steps

The human-readable text after a code is valuable, but it is not standardized across providers. Store the full diagnostic message, the SMTP code, the enhanced status code if present, time, recipient domain, sending identity, and internal message ID. This lets engineering and support distinguish a malformed address from a temporary deferral or a domain-authentication problem.

Acceptance by the remote SMTP server means that server took responsibility for processing the message. It does not prove the recipient saw it, opened it, or received it in the inbox. Once a mailbox provider accepts mail, it may still apply post-acceptance spam filtering, foldering rules, or security scanning.

Bounces, suppressions, complaints, and delivery events

Transactional email systems need feedback loops. If you continue sending to invalid or rejecting addresses, you increase waste, harm reputation, and make real deliverability problems harder to see.

Hard and soft bounces

A hard bounce is generally a permanent delivery failure, such as 550 5.1.1 for an unknown mailbox. A soft bounce is generally temporary, such as a full mailbox, rate limit, or temporary recipient-server failure. The labels are useful shorthand, but use the exact code and diagnostic text rather than assuming every provider classifies bounces identically.

Your application should normally suppress an address after a clearly permanent failure. For transient failures, let the sending service retry according to its queue policy, then investigate if the pattern persists. Never automatically resubscribe or repeatedly hammer an address that has produced a permanent rejection.

Spam complaints and opt-outs

A spam complaint occurs when a recipient marks a message as spam or junk. Even when a transactional message is operationally necessary, complaints are a signal worth investigating. They can reveal unexpected sends, confusing sender identity, stale addresses, broken account flows, or content that appears promotional.

Keep transactional and promotional traffic logically separate. Use distinct message categories, tags, streams, or subdomains when your platform supports them. This separation makes reporting clearer and helps prevent marketing volume or complaint rates from obscuring problems with critical password resets or receipts.

Legal rules differ by jurisdiction and message type, so involve counsel for compliance decisions. From an engineering perspective, honor applicable opt-outs and suppression requests consistently, but do not accidentally suppress essential security messages without understanding the product and legal implications. A person who opts out of promotional offers may still need a receipt or security alert.

Webhooks and event ingestion

Many providers can notify your application about message events through webhooks. Typical events include queued, sent, delivered, bounced, complained, opened, clicked, unsubscribed, or deferred. Event names differ by provider, so design your internal model around concepts rather than assuming a universal vocabulary.

Treat webhooks like any other public HTTP integration:

  1. Verify the provider’s signature or authentication mechanism.
  2. Require HTTPS.
  3. Return a fast success response after durable storage.
  4. Process events asynchronously.
  5. Deduplicate events using provider event IDs or a stable composite key.
  6. Handle out-of-order and repeated deliveries.
  7. Retain enough raw payload data for troubleshooting while respecting privacy requirements.

Do not make critical product state depend solely on an open or click event. Open tracking can be affected by image blocking, privacy proxies, prefetching, and client behavior. Click tracking is stronger evidence of a URL request but is still not proof that the intended human read the message. For password-reset flows, the authoritative signal is a successful token redemption in your application.

Deliverability is more than passing authentication

SPF, DKIM, and DMARC are essential, but passing them does not guarantee inbox placement. Deliverability is the combined result of authenticated identity, reputation, content, recipient engagement, sending behavior, infrastructure quality, and recipient-specific filtering.

A technically correct message can still be filtered if it comes from a new domain with little history, contains suspicious links, targets old or invalid addresses, has a poor complaint history, or suddenly increases volume by 100 times. Conversely, a polished template cannot compensate for missing authentication or an unauthorized sender.

Practical deliverability habits

Build these practices into the application and operations process:

  • Send only to addresses collected or confirmed through a legitimate product relationship.
  • Verify domains before sending and keep DNS records current.
  • Use a stable, recognizable From name and address.
  • Include both HTML and text versions.
  • Keep sender domains and link domains aligned with your brand where possible.
  • Avoid URL shorteners and unnecessary redirect chains in operational mail.
  • Separate transactional traffic from bulk promotions.
  • Ramp new domains and dedicated infrastructure gradually rather than sending large bursts immediately.
  • Remove invalid addresses promptly and investigate complaint spikes.
  • Monitor per-recipient-domain performance; a problem affecting one mailbox provider may not appear in aggregate metrics.

Test messages before launching. Tools such as Mail-Tester can help inspect content and authentication signals, while MXToolbox can help inspect public DNS records and mail-related configuration. These tools are useful diagnostics, not inbox-placement guarantees: real recipients and mailbox-provider behavior remain the final test.

Reliability patterns for developers

Reliable transactional email is an application-design problem as much as an email-infrastructure problem. The goal is not merely “send an email”; it is “send the right message exactly once when possible, safely retry when needed, and retain evidence of what happened.”

Use idempotency and durable message records

Create a durable record containing your own message identifier, event type, recipient, template version, business object reference, and desired send time. If a worker retries, it should find the existing record rather than create a new send attempt without context.

For example, a receipt record might use an idempotency key such as receipt:order-10482. A second attempt for the same paid order should reuse that key and either return the existing send result or be explicitly marked as a resend. This protects users from duplicate invoices while allowing support staff to intentionally resend a receipt when needed.

Choose retries based on failure class

Network timeouts, 429 responses, and most server-side 5xx API responses may be retryable. Invalid payloads, unauthorized credentials, malformed addresses, and permanent SMTP bounces usually are not. Retry with exponential backoff and jitter so a broad outage does not cause every worker to retry at the same instant.

A simple schedule might attempt again after one minute, five minutes, 20 minutes, and one hour, subject to message expiration. The exact values should reflect your provider’s limits, your traffic, and the urgency of the message. A one-time code may need a much shorter cutoff than an invoice.

Protect secrets and personal data

Store API keys and SMTP credentials in a secrets manager or protected environment variables, not in source code, browser code, mobile apps, issue trackers, or logs. Give credentials the minimum permissions possible, rotate them, and revoke them when exposure is suspected.

Treat email content as sensitive data. Avoid putting passwords, full payment-card data, government identifiers, or unnecessarily detailed personal data in the subject line or message. Subject lines may be visible in notifications, previews, and shared screens. If a message links to a protected resource, require the appropriate authentication or use a narrowly scoped, expiring token.

A practical implementation checklist

Before sending production transactional email, work through this checklist:

  • Define event names and ownership for every important message type.
  • Build durable send records or use an outbox pattern.
  • Select REST API, SMTP relay, or both based on the calling system.
  • Keep credentials server-side and rotate them periodically.
  • Verify the sending domain in the email platform.
  • Publish and validate SPF, DKIM, and DMARC records.
  • Confirm that SPF includes every legitimate sender without exceeding lookup limits.
  • Start DMARC monitoring before enforcing quarantine or reject.
  • Send both HTML and plain-text content.
  • Add unique message IDs, tags, or metadata for correlation.
  • Implement safe retries, idempotency, and expiry rules.
  • Receive and verify delivery-event webhooks.
  • Suppress permanent failures and monitor temporary failures.
  • Test at major mailbox providers and inspect message headers.
  • Use Mail-Tester and MXToolbox as pre-launch diagnostics.
  • Document incident procedures for credential leaks, bounce spikes, and authentication failures.

Common misconceptions about transactional email

Several misunderstandings cause avoidable production problems.

“The API returned success, so the user got the email.” API success usually means your provider accepted the request. Delivery requires additional queueing, routing, recipient acceptance, and filtering steps.

“A 250 response means the email is in the inbox.” It means the receiving SMTP system accepted responsibility for the message. It does not prove inbox placement, visibility, or user engagement.

“SPF alone protects our visible From address.” SPF checks the envelope sender identity. DMARC is what connects authentication results to the visible From domain through alignment.

“We can retry every failure forever.” Permanent failures waste resources and damage reputation. Temporary failures need bounded retries, and time-sensitive messages need expiration.

“Open rates show whether users received critical messages.” Open tracking is unreliable as a delivery guarantee. Use delivery events for transport visibility and application events for completion of actions.

“A transactional email provider removes our responsibility for email quality.” A provider operates infrastructure, but your sending domain, recipient quality, template behavior, authentication setup, and retry logic still strongly influence outcomes.

Conclusion

Transactional email works through a chain of application events, authenticated submission, queued SMTP delivery, recipient-server decisions, and feedback events. The most reliable implementations treat that chain as a distributed system: they use durable records, idempotency, bounded retries, strong DNS authentication, clear templates, and careful monitoring.

The practical priority is straightforward. First, make sure your application sends the correct message at the correct time. Then make its identity trustworthy with SPF, DKIM, and DMARC. Finally, capture delivery and bounce signals so you can correct problems before they become user-facing failures or reputational damage.

FAQ

What is the difference between transactional and marketing email?

Transactional email is triggered by a specific user action or service event, such as a password reset or receipt. Marketing email is generally sent as a campaign to promote, educate, or nurture an audience. The technical sending path is similar, but the expectations, consent considerations, urgency, and reputation-management strategies differ.

Does an HTTP 202 response mean an email was delivered?

No. 202 Accepted usually means the email provider accepted the request for asynchronous processing. Check provider delivery events, SMTP responses, and bounce information to understand whether recipient infrastructure later accepted or rejected the message.

Do I need SPF, DKIM, and DMARC for transactional emails?

Yes, in practice you should configure all three for a production sending domain. SPF authorizes envelope senders, DKIM signs messages, and DMARC applies alignment and policy around the visible From domain.

Why did a valid email address bounce?

A valid address can still bounce because the mailbox is temporarily unavailable, the recipient server is rate-limiting traffic, the domain has a policy restriction, authentication is misconfigured, the sender has poor reputation, or the message violates a content or security rule. Read the full SMTP and enhanced-status diagnostic rather than relying only on the word “bounce.”

Should password-reset emails be retried?

Retry temporary delivery failures, but set a short expiration window because reset links and codes are security-sensitive and time-limited. Never keep retrying a stale code indefinitely; issue a fresh token when the user requests another reset.