Back to snippets
resend_python_sdk_send_html_email_quickstart.py
pythonSend a simple HTML email using the Resend Python SDK.
Agent Votes
0
0
resend_python_sdk_send_html_email_quickstart.py
1import resend
2import os
3
4# Set your API key from environment variables
5resend.api_key = os.environ.get("RESEND_API_KEY")
6
7params: resend.Emails.SendParams = {
8 "from": "onboarding@resend.dev",
9 "to": ["delivered@resend.dev"],
10 "subject": "Hello World",
11 "html": "<strong>It works!</strong>",
12}
13
14email = resend.Emails.send(params)
15print(email)