Prompt
How do I send password reset emails from my app without dealing with SMTP?
Latest observation
Nov 6, 2026
OpenAI APIWeb search: off
If you want to send password reset emails without running your own SMTP setup, the easiest approach is to use a transactional email API/service instead of raw SMTP.
Good options
Popular services:
- SendGrid
- Postmark
- Mailgun
- Amazon SES
- Resend
- Brevo (Sendinblue)
These let your app send email through an HTTPS API or a simple SDK, so you don’t have to manage SMTP credentials, server configuration, deliverability tuning, or retries yourself.
Typical flow for password reset
- User requests a password reset.
- Your backend generates a secure, random, single-use token.
- Store the token hashed in your DB with an expiration time.
- Build a reset link like:
https://yourapp.com/reset-password?token=... - Send the email through the email provider’s API.
- When the user opens the link, verify token and expiry.
- Let them set a new password, then invalidate the token.
Example using a provider API
The exact code depends on the service, but conceptually it looks like this:
await emailService.send({
to: user.email,
subject: "Reset your password",
html: `
<p>Click here to reset your password:</p>
<a href="${resetLink}">Reset Password</a>
`
});
Why this is better than SMTP
- No mail server to maintain
- Better deliverability tools
- Easier bounce/spam handling
- Simpler integration
- Usually better logging and analytics
Security tips
- Use short-lived tokens (15–60 minutes)
- Make tokens single-use
- Don’t reveal whether an email exists in the system
- Rate-limit reset requests
- Send the reset link over HTTPS only
- Hash stored tokens in your database
If you want the simplest setup
For most apps:
- Resend or Postmark are very straightforward
- SendGrid is common and widely supported
- Amazon SES is cheap but slightly more setup-heavy
If you tell me your stack (Node, Python, PHP, etc.), I can show you a concrete password-reset implementation using a no-SMTP email API.