Prompt
How to send email from your app without SMTP
Latest observation
You generally have three common ways to send email from an app without running your own SMTP server:
1) Use an email-sending API service
This is the most common modern approach.
Examples:
- SendGrid
- Mailgun
- Amazon SES
- Postmark
- Resend
How it works:
- Your app makes an HTTPS request to the provider’s API.
- The provider handles delivery to recipients’ mail servers.
Why people use it:
- No need to manage SMTP credentials or servers
- Better deliverability tools
- Easy to track opens, bounces, and failures
Example flow:
- Your app calls the provider API
- Provider accepts the message
- Provider delivers it to the recipient
Example pseudo-code:
await fetch("https://api.sendgrid.com/v3/mail/send", {
method: "POST",
headers: {
"Authorization": `Bearer ${ პროცეს.env.SENDGRID_API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
personalizations: [{ to: [{ email: "user@example.com" }] }],
from: { email: "you@yourapp.com" },
subject: "Welcome",
content: [{ type: "text/plain", value: "Hello!" }]
})
});
2) Use a transactional email SDK
Many providers offer SDKs that wrap their API.
Examples:
- Resend SDK
- SendGrid SDK
- Mailgun SDK
This is still not SMTP — it’s usually just a nicer way to call the provider’s HTTP API.
3) Use an email relay or serverless function that calls an API
If you don’t want email logic in your app directly:
- Send a request to your backend/serverless function
- That function calls the email provider API
This helps with:
- Keeping API keys secret
- Rate limiting
- Queueing emails
- Logging and retries
Important note
If by “without SMTP” you mean “send directly from your app to the recipient’s inbox provider with no third-party service,” that’s usually not practical.
Why:
- Modern email delivery relies on SMTP somewhere in the chain
- You’d need mail server infrastructure, DNS records, SPF/DKIM/DMARC, IP reputation, etc.
So in practice, “without SMTP” usually means:
- Don’t run your own SMTP server
- Use an email provider API instead
Best option
For most apps:
- Use a provider API like SendGrid, Mailgun, SES, Postmark, or Resend
If you want, I can show you:
- how to send email from Node.js
- how to do it in Python
- how to do it with Java / C# / PHP
- how to set up SPF, DKIM, and DMARC for better deliverability
Observation history
Unlock observation history
Create a free Obsurfable account to unlock historical responses, model comparisons, and deeper brand intelligence.
How did Obsurfable measure this prompt?
Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.
Which AI systems does Obsurfable collect answers from?
OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, and Meta AI.