Python Quickstart
Send your first email with the Mailofly Python SDK. Requires: Python 3.9+ · API key · Account key1. Install
2. Send an email
3. Check mail logs
Next
- Python SDK — full reference
- Sending examples
- API: Emails
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
pip install mailofly
import os
from mailofly import Mailofly
client = Mailofly(os.environ["MAILOFLY_API_KEY"])
result = client.emails.send({
"from": "Acme <onboarding@example.com>",
"to": ["you@example.com"],
"subject": "Hello from Mailofly",
"html": "<p>It works!</p>",
})
print(result["id"])
client.mail_logs.list(page=1, page_size=10)