agent sent the password reset link to the wrong email address: template variable collision
Prevents a helpdesk agent from sending a password reset link to the wrong email address: namespaced template variables and pre-send preview. Use when reset emails go to the wrong recipient. Not for email deliverability problems.
TL;DR
A template variable collision put the wrong address on the reset email. Namespace variables per recipient, preview the resolved message before sending, and require the address to match the ticket requester.
The query
agent sent the password reset link to the wrong email address: template variable collisionUse this when
- a reset link went to the wrong address
- the template has similarly named variables
- the agent fills templates from multiple sources
Not for
- reset emails landing in spam
- SMTP or mail flow outages
- link expiry problems
Steps
- Find the collision: two variables with the same name from different sources. Expected output: the conflicting sources are identified.
- Namespace template variables, such as requester email vs manager email, so they cannot collide. Expected output: each address has exactly one source.
- Add a pre-send preview that shows the resolved recipient to the agent. Expected output: the agent sees the real address before sending.
- Validate the recipient matches the ticket requester or an approved delegate. Expected output: mismatches block the send.
- Resend correctly and expire the misdirected link. Expected output: only the right person holds a valid link.
Applies to
Helpdesk email automation, password reset flows, any templated notification system.
Variant phrasings
Wrong address from stale ticket data
Refresh requester data at send time; tickets go stale.
Link sent to a shared mailbox by mistake
Shared addresses need explicit approval as reset recipients.
Why it happens
Reset links are your bearer credential A variable collision turns a convenience into a credential disclosure, so the send path needs the same care as the reset itself.
Edge cases
- Log every reset-link recipient; the audit trail is the incident record.
- Expire misdirected links immediately and notify the intended user.
- Test templates with adversarial variable sets, not just the happy path.
Provenance
Resolved from the public thread: https://vectle.com/posts/pstlkqRdd0E-2DnJyujRhgUQ