Build email into your application
Choose a task, follow the working code, and check the result. These guides cover receiving email as signed JSON, sending application email, connecting existing inboxes, and building agent workflows.
New to MailKite? Start with the product quickstart. Each section below collects a complete set of related walkthroughs.
Getting started
Choose the email workflow your application needs.
Server guides
Open the independent mail server guide and its project menu.
Bulk email for developers: batches, broadcasts, and queues
Choose a bulk email architecture, handle partial failures, and build recipient-safe delivery with batches, broadcasts, and durable queues.
Programmatic newsletters: subscribers, campaigns, and unsubscribe
Build a programmatic newsletter lifecycle with consent records, subscriber preferences, reviewed campaigns, unsubscribe handling, and delivery feedback.
Cold email workflows: platform selection, pacing, and replies
Evaluate cold email platforms and design reply-aware workflows with recipient state, pacing, suppression, and local JavaScript or Python simulations.
Programmatic email: events, sequences, and scheduled sends
Design event-driven email with durable jobs, deduplicated events, scheduled sends, sequence exits, cancellation, and observable recipient outcomes.
Receiving email
Run a signed JSON webhook receiver in your language.
PHP
PHP 8.1+, Composer, and the PDO SQLite extension.
Python
Python 3.10+; SQLite is included in Python's standard library.
Node.js / TypeScript
Node.js 22.13+ for the built-in node:sqlite module used here.
Ruby
Ruby 3.2+ with RubyGems.
Go
A current Go toolchain.
Java
JDK 17+ and Maven. The example uses the JDK HTTP server and Jackson.
C# / .NET
.NET 10 SDK and Git. The SDK is referenced from its tested public source revision because the NuGet package is not available.
Rust
A current Rust toolchain. Save the receiver as src/main.rs in the inbound project.
Elixir
Elixir 1.18+ and a compatible Erlang/OTP runtime.
Connecting inboxes
Forward messages from your existing mailbox to your application.
Inbound email parsing
Receive and parse inbound mail with your email provider.
Amazon SES inbound email
Receive and parse inbound email on Amazon SES with receipt rules, S3, SNS and Lambda — then see the same flow on MailKite: one MX record and a signed, decoded JSON webhook.
Brevo inbound parsing
Set up Brevo's inbound parse webhook to receive email as JSON, then see the same inbound flow on MailKite: one MX record, a signed payload, attachments as links.
Cloudflare Email Routing
Receive and parse inbound email with Cloudflare Email Routing and Email Workers, then see the same flow the MailKite way: one MX record, decoded JSON, signed webhooks.
Mailgun Routes (inbound email)
inbound to app
Mailjet Parse API
Set up Mailjet's Parse API to receive and parse inbound email as JSON, then see the same inbound flow the MailKite way: one MX record, a signed payload, attachments as links.
Mandrill Inbound
Set up Mandrill inbound email: point an MX at Mandrill, add a route, and parse the mandrill_events payload — then see the same inbound flow the MailKite way.
Postmark Inbound
Set up Postmark Inbound to receive and parse email as JSON, then see the same inbound flow the MailKite way: one MX record, a signed payload, attachments as links.
Resend inbound email
Receive and parse inbound email on Resend — the MX record, the signed email.received webhook, and fetching the body — then see the same flow the MailKite way.
SendGrid Inbound Parse
Set up SendGrid's Inbound Parse webhook to receive email as data, then see the same inbound flow on MailKite: one MX record, a signed JSON payload, attachments as links.
Sending email
Send application email through an email service provider.
Send email with Amazon SES
Verify a domain and send transactional email with Amazon SES — over the API or SMTP — then send the same message the MailKite way.
Send email with Brevo
Authenticate a domain and send transactional email with Brevo — over the API or SMTP — then send the same message the MailKite way.
Send email with Cloudflare
Send transactional email from a Cloudflare Worker with Cloudflare Email Service — binding, REST API, or SMTP — then send the same message the MailKite way.
Send email with Mailgun
Authenticate a domain and send transactional email with Mailgun — over the API or SMTP — then send the same message the MailKite way.
Send email with Mailjet
Authenticate a domain and send transactional email with Mailjet — over the API or SMTP — then send the same message the MailKite way.
Send email with Mandrill
Authenticate a domain and send transactional email with Mandrill — over the API or SMTP — then send the same message the MailKite way.
Send email with Postmark
Authenticate a domain and send transactional email with Postmark — over the API or SMTP — then send the same message the MailKite way.
Send email with Resend
Authenticate a domain and send transactional email with Resend — over the API or SMTP — then send the same message the MailKite way.
Send email with SendGrid
Authenticate a domain and send transactional email with SendGrid — over the API or SMTP — then send the same message the MailKite way.
Application-triggered email
Connect email to application events and background jobs.
Bulk email
Send a batch safely with the SDK in your language.
Send bulk email with JavaScript and Node.js
Send private bulk email with JavaScript: SDK batches, per-recipient outcomes, checkpointed retries, and a runnable Node.js mock.
Send bulk email with Python
Send private bulk email with Python using SDK batches, validated results, a recipient ledger, selective retries, and credential-free mock tests.
Send bulk email with PHP
Send private bulk email with PHP: SDK batches, a CLI checkpoint ledger, partial failures, selective retries, and runnable local mocks.
Programmatic newsletters
Build and operate a newsletter workflow.
Send newsletters with JavaScript and Node.js
Build a subscriber-to-broadcast newsletter with the MailKite Node SDK, separate management auth, suppression checks, and a no-send mock demo.
Send newsletters with Python
Implement a Python newsletter lifecycle with confirmed subscribers, list audiences, management-token auth, broadcasts, and local no-send tests.
Outreach workflows
Understand the boundaries of programmatic outreach.
Build a cold email workflow with JavaScript
Run a local Node.js outreach simulation with pacing, checkpoints, dedupe, and stop-on-reply. Hosted MailKite excludes unsolicited outreach.
Build a cold email workflow with Python
Test a SQLite-backed outreach simulation in Python with pacing, reply cancellation, opt-outs, bounces, and dedupe. No email transport is enabled.
Provider comparisons
Compare delivery tools and integration approaches.
Bulk email APIs compared: MailKite, SES, SendGrid, Mailgun, Resend
Compare bulk email API limits, personalization, recovery, pricing models, and sending policies for MailKite, SES, SendGrid, Mailgun, and Resend.
listmonk vs Keila for self-hosted newsletters
Compare listmonk and Keila installation, APIs, editors, segmentation, licenses, transport ownership, and newsletter operations.
Cold email platforms compared: Smartlead, Instantly, and lemlist
Compare Smartlead, Instantly, and lemlist APIs, mailbox connections, reply events, sequencing, pricing models, and current sending-policy restrictions.
Agent email
Give an agent an inbox, handle replies, and build a support workflow.
Set up your agent's email
Go from zero to a working agent inbox on MailKite: create an account, connect the MCP server, add a domain, and open an inbox your agent can send and receive from.
Agent email
Give an AI agent its own inbox: send and receive email from your agent. Compare agent-native inbox APIs and the ESPs you can wrap, then the MCP-native MailKite way.
Send & receive from your agent
The everyday agent email loop on MailKite: send over a verified domain, read inbound as clean JSON, reply in-thread, and attach files — all as MCP tool calls.
Build a support inbox agent
Turn one address into an AI agent that answers inbound email, replies in-thread, and escalates what it can't resolve — one route on MailKite, no server.
Agent email providers
Connect an agent through the provider you use.
Agent email with AgentMail
Give an AI agent its own email inbox with AgentMail — create it, send, and receive — then the MCP-native MailKite way, where the agent has email tools built in.
Agent email with Amazon SES
Give an AI agent its own inbox with Amazon SES — wrap send and wire up inbound — then the MCP-native MailKite way, where the agent has email tools built in.
Agent email with Brevo
Give an AI agent its own email inbox with Brevo — wrap its send API and Inbound Parse webhook as tools — then the MCP-native MailKite way, where email is built in.
Agent email with Cloudflare
Give an AI agent its own inbox with Cloudflare Email Service and Email Routing — send and receive from a Worker — then the MCP-native MailKite way.
Agent email with the Gmail API
Give an AI agent email with the Gmail API — OAuth, sending, and push notifications — then the MCP-native MailKite way, where the agent has email tools built in.
Agent email with Mailgun
Give an AI agent email with Mailgun — wrap its send API as a tool and receive via Routes — then the MCP-native MailKite way, where email is built-in agent tools.
Agent email with Mailjet
Give an AI agent its own email inbox with Mailjet — wrap send and inbound as tools — then the MCP-native MailKite way, where the agent has email tools built in.
Agent email with Mandrill
Give an AI agent its own email with Mandrill — wrap the send API as a tool and take inbound over a route webhook — then the MCP-native MailKite way.
Agent email with Microsoft Graph
Give an AI agent email with Microsoft Graph — register the app, send, and receive change notifications — then the MCP-native MailKite way.
Agent email with Nylas
Connect an existing Gmail, Outlook, or IMAP mailbox to an AI agent with Nylas — send and receive — then the MCP-native MailKite way, where email is native tools.
Agent email with Postmark
Give an AI agent email with Postmark — wrap its send API and inbound webhook as tools — then the MCP-native MailKite way, where the agent has email tools built in.
Agent email with Resend
Give an AI agent email with Resend — wrap its send API as a tool and receive via a signed inbound webhook — then the MCP-native MailKite way, where email is built-in tools.
Agent email with SendGrid
Give an AI agent email with SendGrid — wrap its send API and Inbound Parse webhook as tools — then the MCP-native MailKite way, with email tools built in.