Skip to main content

Prerequisites

To get the most out of this guide, you’ll need to:

1. Install

Get the Emailr Python SDK.
pip install emailr

2. Send email using HTML

The easiest way to send an email is by using the html parameter.
index.py
import os
import emailr

emailr.api_key = os.environ["EMAILR_API_KEY"]

params: emailr.Emails.SendParams = {
    "from": "Acme <[email protected]>",
    "to": ["[email protected]"],
    "subject": "hello world",
    "html": "<strong>it works!</strong>",
}

email = emailr.Emails.send(params)
print(email)

3. Try it yourself

Python Example

See the full source code.