> Send password reset emails that arrive fast and land in the inbox, with data stored in India. Good practice for reset links, and how to send them with Vaartix.

Source: https://vaartix.com/use-cases/password-reset

Use cases: [OTP emails](https://vaartix.com/use-cases/otp-emails) · [Password reset](https://vaartix.com/use-cases/password-reset) · [Order confirmations](https://vaartix.com/use-cases/order-confirmations)

# Password reset emails

Transactional email with Vaartix

A password reset email is how people get back into your product. It has to arrive quickly, look trustworthy, and carry a link that only works once.

## Why it matters

-   Someone who can't reset their password can't use your product, and often writes to support instead.
-   Reset emails are a favourite of phishers, so yours should be clearly from your verified domain, with SPF, DKIM and DMARC passing.
-   A reset link is a key to the account: it must expire and must not leak.

## Good practice

-   Use a long, random, single-use token in the link, and make it expire (an hour or less is common).
-   Say who asked and when, and what to do if it wasn't them. Don't include the old or a new password.
-   Send from your own verified domain with [SPF, DKIM and DMARC](https://vaartix.com/docs/guides/spf-dkim-dmarc/) in place.
-   Don't put tracking on reset links: the link should go straight to your site.
-   Use an [idempotency key](https://vaartix.com/docs/sending/idempotency/) so a double click doesn't send two emails.
-   After the password changes, send a short confirmation, so the owner notices if it wasn't them.

## Send it with Vaartix

```
await vaartix.emails.send(
  {
    from: 'Acme <security@acme.in>',
    to: user.email,
    subject: 'Reset your Acme password',
    html: `<p>Someone asked to reset the password for ${user.email}.</p>
           <p><a href="https://acme.in/reset?token=${token}">Choose a new password</a>
           (the link works once, for 1 hour).</p>
           <p>If it wasn't you, ignore this email: your password stays the same.</p>`,
  },
  { idempotencyKey: `reset-${resetRequestId}` },
);
```

Using Laravel, Django or another framework's built-in reset flow? Point its mailer at Vaartix with the [Laravel](https://vaartix.com/docs/guides/laravel/), [Django](https://vaartix.com/docs/guides/django/) or [Symfony](https://vaartix.com/docs/guides/symfony/) guide, or over [SMTP](https://vaartix.com/docs/sending/smtp/).

**Vaartix is in private beta, and invite-only.** Every feature is free during the beta. Tell us what you send and we'll invite you as places open up.

[Request early access](https://vaartix.com/#early-access)
