Prompt
How to send email from your app without SMTP
Latest observation
Oct 21, 2026
OpenAI APIWeb search: off
You generally have 3 ways to send email from an app without managing your own SMTP server:
1) Use an email API service
This is the most common approach.
Examples:
- SendGrid
- Mailgun
- Postmark
- Amazon SES
- Resend
- Brevo
How it works:
- Your app sends an HTTPS request to the provider’s API.
- The provider handles delivery, retries, reputation, bounce handling, etc.
Typical flow:
- Create an account with the provider
- Verify your domain
- Get an API key
- Call their REST API from your app
Example request pattern:
POST /send
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
This is usually better than SMTP because:
- simpler integration
- easier logging and analytics
- better deliverability tooling
- no need to run mail servers
2) Use a cloud platform’s built-in email service
If your app runs on cloud infrastructure, you may have a managed mail option already.
Examples:
- AWS SES
- Google Workspace / Gmail API for limited use cases
- Azure Communication Services Email
- Firebase extensions / third-party integrations
This still avoids running SMTP yourself, though some services may internally use SMTP-like infrastructure.
3) Use the email provider’s API directly
For example:
- Gmail API
- Microsoft Graph Mail API
This is useful if you want to send mail as a user’s mailbox rather than from a transactional service.
Good for:
- user-authorized sending
- internal tools
- apps integrated with Microsoft 365 or Google Workspace
Not ideal for:
- high-volume transactional email
- marketing email
- system notifications
What you should choose
- Transactional email like password resets, receipts, alerts: use SendGrid, Postmark, Resend, SES
- Sending as a user from Gmail/Outlook: use Gmail API or Microsoft Graph
- High control and low cost at scale: use Amazon SES
Important notes
Even if you skip SMTP, you still need:
- a verified sender domain
- SPF/DKIM/DMARC records for good deliverability
- bounce and complaint handling
- spam-safe content
Simple example with an email API
Pseudo-code:
fetch("https://api.emailservice.com/send", {
method: "POST",
headers: {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
from: "noreply@yourdomain.com",
to: "user@example.com",
subject: "Welcome",
text: "Thanks for signing up!"
})
});
If you want, I can show you:
- how to do this in Node.js, Python, PHP, or Java
- how to send email using Gmail API or Microsoft Graph
- which service is best for your app