Skip to content

Secure password resets that reach the inbox

Send password reset emails instantly with priority delivery. Expiring tokens, rate limiting guidance, and full tracking for security-critical flows.

Priority DeliveryHigh DeliverabilityDelivery Tracking
import { Stack0 } from '@stack0/sdk'
import crypto from 'crypto'
const stack0 = new Stack0({ apiKey: process.env.STACK0_API_KEY })
// Send password reset email
export async function sendPasswordResetEmail(user: User) {
// Generate secure token (store hash in DB with expiry)
const token = crypto.randomBytes(32).toString('hex')
const resetUrl = `https://app.yourdomain.com/reset?token=${token}`
await stack0.mail.send({
from: 'security@yourdomain.com',
to: user.email,
subject: 'Reset your password',
templateId: 'password-reset',
templateVariables: {
name: user.name,
resetUrl,
expiresIn: '1 hour',
},
// Priority delivery for security emails
priority: 'high',
})
return { token, expiresAt: Date.now() + 3600000 }
}

What's included

Priority Sending

Security emails bypass standard queues. Delivered in seconds.

Template Variables

Use {{name}}, {{resetUrl}}, {{expiresIn}} in templates. Preview with test data.

Delivery Tracking

Know exactly when emails are delivered. Debug delivery issues fast.

Bounce Handling

Invalid emails automatically suppressed. Keep your sender reputation clean.

Expiry Support

Display token expiry in emails. Guide users with clear time limits.

Security Headers

Proper SPF, DKIM, and DMARC setup. Pass security filters.

Built for production

Priority delivery

Security emails sent with highest priority. Users get reset links in seconds, not minutes.

High deliverability

Password reset emails that actually reach the inbox. Not the spam folder.

Template variables

Personalize with user name, expiry time, and custom branding. Make it feel secure.

Delivery tracking

Know when reset emails are delivered and opened. Debug issues quickly.

TypeScript SDK

Full type safety for security-critical code. Catch errors before they reach production.

Simple pricing

$0.50 per 1,000 emails. No premium for priority delivery.

Common implementations

Forgot Password Flow

Standard password recovery when users forget their credentials.

Security Alert Reset

Force password reset after suspicious activity detection.

Account Recovery

Help users regain access after being locked out.

Password Expiry

Prompt users to update passwords that meet expiry policies.

Frequently asked questions

Ready to build?

Get started in minutes.

Get Started