Prompt
How do I send password reset emails from my app without running an SMTP server?
Latest observation
Nov 8, 2026
OpenAI APIWeb search: off
You don’t need to run your own SMTP server to send password reset emails. The usual approach is to use a transactional email service or an email API.
Common options
1) Use an email delivery service
Examples:
- SendGrid
- Mailgun
- Postmark
- Amazon SES
- Brevo (Sendinblue)
- Resend
These services handle sending, deliverability, and retries for you. Your app calls their API or uses SMTP credentials they provide, but you don’t host the mail server yourself.
2) Use SMTP from a third-party provider
If your app library expects SMTP, you can still avoid running a server by using:
- Gmail / Google Workspace SMTP
- Outlook / Microsoft 365 SMTP
- SendGrid SMTP relay
- Mailgun SMTP
- Amazon SES SMTP
So you’re not operating SMTP infrastructure, just authenticating to a provider.
3) Use an email API directly
Many services offer HTTPS APIs, which is often simpler than SMTP:
- Better error handling
- Easier templates
- Less configuration
- Easier tracking/logging
Typical password reset flow
- User requests a reset.
- Your backend generates a secure, random, single-use token.
- Store a hashed version of the token with an expiration time.
- Send an email containing a reset link like:
https://yourapp.com/reset-password?token=... - User opens link and sets a new password.
- Invalidate the token after use.
Important security practices
- Use a cryptographically secure random token
- Make tokens short-lived, e.g. 15–60 minutes
- Store token hashes, not raw tokens
- Invalidate old tokens after a new one is issued
- Don’t reveal whether an email exists in the system
- Rate-limit reset requests
- Use HTTPS only
Minimal implementation idea
Your app does something like:
- Generate token
- Save
token_hash,user_id,expires_at - Send email through provider API
- On reset endpoint, verify token and expiration
- Update password and delete token record
Example services to start with
If you want the easiest setup:
- Resend: simple API, great for app emails
- Postmark: very good for transactional emails
- SendGrid: popular and widely supported
- Amazon SES: low cost, slightly more setup
If you want, I can show you:
- a Node.js example using one of these services, or
- the full password reset flow with database schema and code.