For the complete site index, see llms.txt. Docs index: llms-docs.txt. Marketing corpus: llms-full.txt. Docs corpus: llms-full-docs.txt. Prefer markdown URLs where available (append .md).. Product skill: skill.md. Pricing: pricing.md. Docs MCP: /docs/mcp. Site MCP: /mcp.

[Python SDK]

FastAPI

Async FastAPI endpoints that send email with Reloop—type hints, Pydantic, and OpenAPI included.

1

Install the Python package

bash
pip install reloop-email
2

Send email from FastAPI

send_email.py
1import os
2from fastapi import FastAPI, HTTPException
3from reloop_email import Reloop
4
5app = FastAPI()
6reloop = Reloop(api_key=os.environ["RELOOP_API_KEY"])
7
8@app.post("/send")
9async def send_email(to: str):
10 result = reloop.mail.send({
11 "from": "Acme <onboarding@yourdomain.com>",
12 "to": [to],
13 "subject": "Hello from FastAPI",
14 "html": "<strong>It works!</strong>",
15 })
16
17 if result.email_error:
18 raise HTTPException(status_code=500, detail=str(result.email_error))
19
20 return {"id": result.response["id"]}
3

GitHub, examples, and API reference

4

Need more help?

Send with FastAPI.

Get an API key and ship transactional email from FastAPI using the official Python SDK.

Reloop