Use this pre-built prompt to get started faster.
Prerequisites
Before you start, you’ll need:- A Resend API key
- A verified domain
Guide
1
Install
Get the Resend Python SDK.
2
Set your API key
Store your API key in an environment variable in your Access it with
.env file.os.environ["RESEND_API_KEY"]. See Create an API key for the full setup.3
Send email using HTML
The easiest way to send an email is by using the
html parameter.index.py
Examples
Basic Send
Basic email sending
Attachments
Send emails with file attachments
Templates
Send emails using Resend hosted templates
Scheduling
Schedule emails for future delivery
Audiences
Manage contacts and audiences
Domains
Create and manage sending domains
Inbound Webhooks
Receive and process inbound emails
Double Opt-in
Double opt-in subscription flow
Flask App
Full Flask web application
FastAPI App
Full FastAPI web application
Django App
Full Django web application