// agents · replit

Email for Replit.

One package and one secret put real email in a Repl — and Replit Agent can drive the same surface over MCP while it builds for you.

Free sandbox to integrate · Production from $3/month

#01 — Install

One block, then ask.

Install the SDK, put the key in the Secrets pane, send. Python Repls use pip install drin with the same client shape — and Replit Agent can connect to the Drin MCP server for tool-driven work.

Full setup guide
shell + secrets
$ npm i @drin00/sdk

# Secrets pane → DRIN_API_KEY, then:
import { DrinClient } from "@drin00/sdk";
const drin = new DrinClient(process.env.DRIN_API_KEY);

await drin.emails.send({
  from: "hello@mydomain.com",
  to: "sarah@gmail.com",
  subject: "It works from a Repl",
  html: "<b>Hi!</b>",
});

# Python repl? pip install drin — same shape.
#02 — Working prompts

Paste one of these first.

Three real tasks, end to end — copy a prompt and watch it run the tools.

01 · wire sending
Install @drin00/sdk, read DRIN_API_KEY from Replit Secrets, and add a sendWelcomeEmail(user) helper that sends from hello@mydomain.com via Drin. Call it on signup.
02 · inbound webhook
Add an /inbound route to this Repl that accepts Drin email.received webhooks, verifies the signature, and logs from, subject and text.
03 · status check
Using the Drin API, list my last 10 emails with their delivery status and print any bounces with their reasons.
#03 — Questions

Asked about Replit.

SDK or REST?+

Same engine. The Node and Python SDKs are typed wrappers over the REST API — use the SDK in app code, plain fetch/requests in tiny scripts. Nothing differs in behaviour.

Where does the key live?+

The Secrets pane — it becomes process.env.DRIN_API_KEY (or os.environ in Python) at run time, in dev and in deployments. Never hard-code it in the Repl.

Does Replit Agent work with this?+

Yes, two ways: prompt it to write SDK code (the prompts above), or register the Drin MCP server so the agent calls email tools directly while it builds.

Can a deployed Repl receive mail?+

Yes — deployments get a stable URL, so point a Drin inbox webhook at your /inbound route and parsed messages arrive as JSON. How receiving works →