Home/Email API/Android

Send email from an Android app

Two honest paths: an Intent that opens the user's own mail app, or your backend sending through an email API. Never SMTP credentials inside an APK.

Verified By Kam Low, Co-founder · Updated

Never ship SMTP credentials in an app

Any credential you compile into an APK is public. Decompile, extract, abuse: that is the lifecycle of an SMTP password shipped in an app, and it ends with your domain on a blocklist.

So Android email is two different jobs. When the USER should send mail (feedback, share, contact), hand off to their own mail app with an Intent. When YOUR APP should send mail (receipts, alerts, resets), the send belongs on your backend, one API call away.

Server-side infrastructure gets to be strict in ways an APK never can. On our own forwarding relay, TCP 2525 is firewall-restricted to our API host, TLS and exact SMTP authentication are mandatory, and every single-recipient route and MX snapshot is HMAC-signed, with unsigned or replayed requests rejected outright. Keep the credential where that kind of enforcement exists.

One POST, and the send is handled

Kotlin · user-composed mail via IntentPOST /v1/my/messages
val intent = Intent(Intent.ACTION_SENDTO).apply {
    data = Uri.parse("mailto:")
    putExtra(Intent.EXTRA_EMAIL, arrayOf("[email protected]"))
    putExtra(Intent.EXTRA_SUBJECT, "Feedback")
}
startActivity(intent)

For app-generated email, the client calls your backend and the backend makes the same one POST every other page on this guide shows. The key never leaves your server, and delivery events land on your webhook, not in the app.

Scopes bite even when you do keep the key server-side. George, our CEO, hit this inside our own product: our SendGrid connection test probed an endpoint that requires the Sender Authentication scope, so a valid least-privilege Mail-Send key came back 403 and got reported invalid. He swapped the probe to GET /v3/scopes, which any valid key can read while invalid keys still 401, and the regression test went five for five. The lesson for your backend is to test credentials against an endpoint the key is actually scoped for.

Distribution logic applies to your agent tooling too: Codex and ChatGPT now install the email connection with one click through the OpenAI app store. The pattern is the same one you ship by: the store handles trust, the platform handles the work.

Full parameters, responses, and error codes live in the REST API docs and the API reference.

Python Node.js PHP Go Rust +5
send.py requests · stdlib-adjacent
import requests

requests.post(
  "https://api.nitrosend.com/v1/messages",
  headers={"Authorization": f"Bearer {KEY}"},
  json={"to": to, "subject": subj,
        "html": body})
202 ACCEPTED
{ "id": "msg_9f2c",
  "status": "accepted" }

And the part no library gives you

The same account exposes an MCP server, so the agent writing your code can also run your email. Point Claude, Cursor, or Codex at api.nitrosend.com/mcp and it composes, previews, and stages sends, with a human approving every one. The API is for your code. The MCP is for your agent. One platform either way.

Every send comes back with a message ID, and delivery events follow on your webhook: delivered, opened, bounced. No dashboard required to know what happened. Mobile sends still answer to the same rules: how to set up SMTP if you keep a mail server in the loop, and SPF, DKIM and DMARC authentication once real users are receiving.

Go deeper

Everything above still assumes your app or your backend is the one composing the request. Increasingly it does not have to be. Describe the notification or the receipt to Claude, Cursor, or Codex and Nitrosend's MCP server drafts and sends it through the same account, no Retrofit call and no Kotlin coroutine to write.

Guides

FAQ

How do I send email from an Android app?

For user-composed mail, launch their mail app with an ACTION_SENDTO Intent. For app-generated mail like receipts and alerts, call your backend and let it send through an email API, so no credential ships in the APK.

Can I use SMTP directly from Android?

Technically yes, practically never: credentials inside an APK are extractable, mobile IPs have no sending reputation, and mailbox providers treat that mail as spam. Send from your backend.

First send in thirty seconds.

Simple pricing. Unlimited contacts.

Every plan includes full stack emailing: Flows, Newsletter Campaigns and Transactional Email, plus our NitroWheel LLM and all agent integrations (Claude, ChatGPT, Codex, Cursor and others). Pay for what you send, not who you store.

Daily allowances depend on your plan and sender standing. Strong list, domain and delivery evidence can raise standing, including on day one. Trusted receives the full plan allowance; available email credits, safety checks and delivery pacing still apply.

Free
$0
forever
  • Emails 8,000then 500/mo
  • Email types Transactional & Marketing
  • AI actions 20/mo
  • Contacts Free & Unlimited
  • Brands 3
  • Seats 1
  • Recipients / rolling 24h 100–5,000
  • Email validation Prepaid only
Start free
Ultra
$100
per month
  • Emails 125,000/month
  • AI actions 5,000/mo
  • Brands 10
  • Seats 10 · Domains 10
  • Frontier AI Included
  • Dedicated IP Available
  • Recipients / rolling 24h 1,000–625,000
  • Email validation Prepaid only
Get started
Enterprise
$300
per month
  • AI actions Unlimited
  • Unlimited brands & domains Included
  • SSO / SAML Included
  • 99.9% SLA Included
  • Recipients / rolling 24h Contracted
  • Email validation Prepaid only
Get started

Free forever. No credit card required. See full comparison →