Documentation · Website · PyPI · GitHub
The official Python library for Resent transactional email.
pip install resent- Verify a sending domain in the Resent dashboard
- Create an API key under Settings → API keys
- Store it as
RESENT_API_KEY
import os
from resent import Resent
resent = Resent(os.environ["RESENT_API_KEY"])import os
from resent import Resent
resent = Resent(os.environ["RESENT_API_KEY"])
result = resent.emails.send(
from_="Acme <noreply@yourdomain.com>",
to="you@example.com",
subject="Hello World",
html="<p>Congrats on sending your <strong>first email</strong> with Resent!</p>",
)
print(result.submission_id)result = resent.emails.send(
from_="Acme <noreply@yourdomain.com>",
to=["you@example.com"],
subject="Hello World",
html="<strong>It works!</strong>",
)result = resent.emails.send(
from_="Acme <noreply@yourdomain.com>",
to="you@example.com",
subject="Hello World",
text="It works!",
)MIT © Resent
