Scan your whole stack
Are you using receiverdotemail?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v3.0.0
receiverdotemail was last scanned on 27 Nov 2026 at version 3.0.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 3.0.0 LATEST | 27 Nov 2026 | No rules fired |
| 2.1.1 | 26 Nov 2026 | No rules fired |
| 2.1.0 | 26 Nov 2026 | No rules fired |
| 2.0.0 | 20 Nov 2026 | Not shown |
Findings for v3.0.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 3.0.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Official Python SDK for Receiver.email, the programmable inbox API for tests, AI agents and scripts: create an address under your project, wait for the email, and get the OTP code and links already extracted.
pip install receiverdotemail
import asyncio
from receiverdotemail import ReceiverClient
async def main():
async with ReceiverClient() as receiver: # reads RECEIVER_API_KEY
inbox = await receiver.inboxes.create(prefix="signup") # a fresh address per run
await my_app.sign_up(inbox.address) # your app sends the email
# Long-polls until the email arrives; raises ReceiverTimeoutError after 60 s
otp = await receiver.emails.wait_for_otp(recipient=inbox.address, since=inbox.created_at)
print(otp.code) # "847291"
asyncio.run(main())
Without an event loop (Selenium, pytest-playwright's sync page, scripts), use SyncReceiverClient: the same methods, no await. In pytest, the bundled plugin gives every test a fresh inbox (see Pytest Integration):
def test_sign_up(page, inbox): # page from pytest-playwright; inbox from this package
page.get_by_label("Email").fill(inbox.address)
page.get_by_role("button", name="Send code").click()
page.get_by_label("Code").fill(inbox.wait_for_otp().code)
Python 3.9+, async and sync, typed (Pydantic models).
Docs: SDK reference · Quick start: create a project and an API key · REST API
Guides: pytest · Playwright · Selenium · OTP / 2FA · Magic links · Password resets
Also available: the TypeScript SDK, an MCP server for AI agents and a CLI.
inboxes.create()wait_for and wait_for_otp wait 60 s by default and up to an hour, looping the API's 60 s long-poll for youasync for over new emails (Server-Sent Events, reconnects automatically)httpx (ReceiverClient, SyncReceiverClient)receiver and inbox fixtures; failed tests show what the inbox receivedCreate an API key (recv_live_...) in the dashboard:
open your project, then Settings → API Keys. ReceiverClient() reads it from
RECEIVER_API_KEY (and the API URL from RECEIVER_API_URL, if set).
With an API key, project_id is optional on every email and inbox method: the SDK
calls whoami() once and caches the key's project. Pass project_id=... to skip that
call, or when authenticating with a dashboard session token.
client = ReceiverClient(
api_key="recv_live_...", # default: RECEIVER_API_KEY
base_url="https://api.receiver.email/api/v1", # default: RECEIVER_API_URL, else production
timeout=30, # HTTP timeout for ordinary requests (seconds)
user_agent="my-tool/1.0", # default: receiver-sdk-py/<version>
project_id="proj_abc123", # default: RECEIVER_PROJECT_ID, else looked up once via whoami()
)
A missing API key raises ReceiverError with code == "MISSING_API_KEY".
me = await client.whoami()
print(me.auth_type) # "apikey" or "jwt"
print(me.project.email_suffix) # -a3kx9p2m@receiver.email
inbox = await client.inboxes.create(prefix="reset") # prefix is optional
print(inbox.address) # reset-k2m9qa-a3kx9p2m@receiver.email
print(inbox.created_at) # pass as `since` when waiting
Nothing is stored until mail arrives. Always build addresses this way (or from
project.email_suffix), never by hand.
sincesince (a datetime or ISO string) matches mail received strictly after it.
Use inbox.created_at for the first email, and the previous email's received_at
for the next one. Naive datetimes are treated as local time. When omitted, waits
look back 60 seconds and stream() starts from now.
from receiverdotemail import ReceiverTimeoutError
try:
email = await client.emails.wait_for(
recipient=inbox.address,
subject="Reset", # substring, case-insensitive
since=inbox.created_at,
timeout=120, # seconds (default 60, at most 3600); the SDK repeats 60 s server waits
)
reset_link = next(link for link in email.links if "reset" in link)
except ReceiverTimeoutError as e:
print(f"Nothing after {e.waited_seconds}s (since {e.since})")
wait_for returns an Email (recipient, sender, subject, received_at, text_body,
links, otp) or raises ReceiverTimeoutError. It never returns None.
timeout is in seconds: wait_for, wait_for_otp and get_otp raise ReceiverError with
code == "INVALID_TIMEOUT" before any request when it is over 3600 (most likely milliseconds),
negative or not finite.
otp = await client.emails.wait_for_otp(recipient=inbox.address, since=inbox.created_at)
print(otp.code, otp.code_length, otp.source) # "123456", 6, "subject"
print(otp.email.recipient, otp.email.subject) # the email the code came from
print([c.code for c in otp.candidates]) # every code found, newest first
# No waiting: returns None when nothing matches
otp = await client.emails.get_otp(recipient=inbox.address, code_length=6)
code_length is optional (4 to 8): without it the API auto-detects the code, and 5- and
7-digit codes are only found when you ask for them.
async for event in client.emails.stream(recipient=inbox.address, subject="code"):
print(event.email.subject, event.email.links)
if event.otp:
print(event.otp.code)
break # stop whenever you like
Filters: recipient, sender, subject (case-insensitive substring), since (default:
now). Each event.email has the same fields as a list() item. The server closes each connection after about 55 seconds; the SDK reconnects with
the since it reports, so no email is missed or repeated.
await client.emails.send_test(to=inbox.address) # "Your Receiver.email test code: 123456"
response = await client.emails.list(recipient=inbox.address, limit=50)
for email in response.emails:
print(email.subject)
async for email in client.emails.list_all(sender="noreply@example.com"):
...
email = await client.emails.get("email_xyz789") # or get("proj_abc123", "email_xyz789")
print(email.text_body, email.html_body, email.attachments)
# get() holds a preview of bodies over 100,000 characters; get_content reads the whole body
html = await client.emails.get_content("email_xyz789", "html") # "text" (default), "html" or "raw"
await client.emails.delete("email_xyz789")
emails = await client.emails.find_by_sender("noreply@example.com")
resets = await client.emails.find_by_subject("Password Reset") # case-insensitive substring
recent = await client.emails.find_by_recipient(inbox.address, since=inbox.created_at)
List filters: recipient, sender, subject (case-insensitive substring), has_attachments,
since (strictly after), received_before, limit
(max 100), cursor. With subject or has_attachments a page can hold fewer than limit emails
while has_more is still true, so page on with the cursor (list_all() does).
from pathlib import Path
email = await client.emails.get("email_xyz789")
for index, attachment in enumerate(email.attachments):
if attachment.omitted: # over the plan's size limit, not stored
continue
data = await client.emails.get_attachment(email.id, index) # bytes
Path(attachment.filename).write_bytes(data)
Each attachment has filename, content_type, size, and either url (stored) or
omitted == "too_large". url, text_body_uri and html_body_uri are API URLs that need the
same Authorization header as every other request, so they don't open in a browser;
get_attachment() and get_content() fetch them for you.
Webhook management needs a dashboard session token; API keys get 403.
hook = await client.webhooks.create("proj_abc123", "https://ci.example.com/hooks/receiver")
print(hook.secret) # whsec_..., shown once
hooks = await client.webhooks.list("proj_abc123") # List[Webhook]
hook = await client.webhooks.get("proj_abc123", hook.id)
hook = await client.webhooks.update("proj_abc123", hook.id, url="https://ci.example.com/hooks/v2") # url and/or events
delivery = await client.webhooks.test("proj_abc123", hook.id)
deliveries = await client.webhooks.deliveries("proj_abc123", hook.id) # last 50
await client.webhooks.delete("proj_abc123", hook.id)
rotated = await client.webhooks.rotate_secret("proj_abc123", hook.id)
print(rotated.secret) # the new whsec_..., shown once
rotate_secret() takes effect at once: new deliveries are signed with the new secret (retries
already under way keep the old one). Deliveries your receiver rejects before it has the new
secret are not resent, so deploy it promptly.
Verify each delivery in your receiver with the raw request body:
from receiverdotemail import verify_webhook_signature
if not verify_webhook_signature(secret, request.headers["Receiver-Signature"], raw_body):
return 400
Everything here except projects.get and projects.list needs a dashboard session token; an API key gets 403. With an API key, projects.list returns only the key's own project.
from datetime import datetime, timedelta, timezone
projects = await client.projects.list("org_abc123")
project = await client.projects.get("proj_abc123")
await client.projects.create(organization_id="org_abc123", name="CI Tests")
orgs = await client.organizations.list()
response = await client.api_keys.create(
project_id="proj_abc123",
name="CI Pipeline",
expires_at=datetime.now(timezone.utc) + timedelta(days=90), # optional, at most 365 days
)
print(response.key) # Full key, only shown once!
await client.api_keys.revoke("proj_abc123", "key_xyz789")
from receiverdotemail import (
ReceiverError,
ReceiverTimeoutError,
RateLimitError,
AuthenticationError,
NotFoundError,
)
try:
email = await client.emails.wait_for(recipient=inbox.address, timeout=30)
except ReceiverTimeoutError as e:
print(e.since, e.waited_seconds)
except RateLimitError as e:
print(f"Rate limited. Retry at: {e.reset_at}")
except AuthenticationError:
print("Invalid API key")
except NotFoundError:
print("Not found")
except ReceiverError as e:
print(e.message, e.status_code, e.code)
All errors derive from ReceiverError. ReceiverTimeoutError has status_code == 408
and code == "WAIT_TIMEOUT". A wait timeout that isn't seconds raises ReceiverError with
status_code == 0 and code == "INVALID_TIMEOUT".
With a dashboard session, a project or organization you aren't a member of raises
NotFoundError (404), the same as one that doesn't exist. An API key used on any project
other than its own, existing or not, gets 403. Plan limits (projects, webhooks per project,
members, free organizations) answer 403 with code == "LIMIT_REACHED".
SyncReceiverClient takes the same arguments and has the same methods and return
types as ReceiverClient; calls block instead of returning awaitables.
from receiverdotemail import SyncReceiverClient
with SyncReceiverClient() as receiver: # reads RECEIVER_API_KEY
inbox = receiver.inboxes.create(prefix="signup")
otp = receiver.emails.wait_for_otp(recipient=inbox.address, since=inbox.created_at)
for event in receiver.emails.stream(recipient=inbox.address): # a plain iterator
print(event.email.subject)
break
Installing the SDK installs a pytest plugin with two fixtures. They use the sync
client, so they work in plain pytest, with pytest-playwright's page and with Selenium.
receiver: a SyncReceiverClient for the session (reads RECEIVER_API_KEY).inbox: a fresh address for each test, its prefix taken from the test's name, with
wait_for(), wait_for_otp() and emails() bound to it (recipient is the
address and since is when it was created, so mail from earlier tests never matches).
The waits default to 60 seconds.def test_signup_email(inbox):
my_app.signup(inbox.address)
email = inbox.wait_for(subject="Confirm your email")
assert any("confirm" in link for link in email.links)
def test_signup_code(inbox):
my_app.signup(inbox.address)
assert len(inbox.wait_for_otp(code_length=6).code) == 6
When a test that used inbox fails, its report gets a Receiver.email section listing
what the address received (sender, subject, code, links, preview), or saying that nothing
arrived. Turn it off with --receiver-attach=off or receiver_attach = off in your pytest
config. Your own receiver or inbox fixture takes precedence over the plugin's;
-p no:receiverdotemail disables the plugin.
Outside pytest (unittest, a Selenium script), TestInbox.create() returns the same bound inbox:
from receiverdotemail import SyncReceiverClient, TestInbox
with SyncReceiverClient() as receiver:
inbox = TestInbox.create(receiver, prefix="signup")
driver.find_element(By.NAME, "email").send_keys(inbox.address)
code = inbox.wait_for_otp().code
print(inbox.report()) # what the address received, as in the pytest failure section
For async tests, define your own fixture with the async client. They need
pytest-asyncio with asyncio_mode = "auto"
(in pyproject.toml under [tool.pytest.ini_options]).
import pytest
from receiverdotemail import ReceiverClient
@pytest.fixture
async def receiver():
async with ReceiverClient() as client: # RECEIVER_API_KEY from the environment
yield client
async def test_signup_email_async(receiver):
inbox = await receiver.inboxes.create(prefix="signup")
await my_app.signup(inbox.address)
email = await receiver.emails.wait_for(
recipient=inbox.address,
subject="Confirm your email",
since=inbox.created_at,
)
assert any("confirm" in link for link in email.links)
email.send_to is now email.recipient, also on otp.email, otp.candidates[].email and
stream events' email.received_after is gone: pass since (strictly after) to list(), list_all(), the waits
and get_otp().wait_for and wait_for_otp wait 60 seconds by default (was 30); a timeout over 3600
raises ReceiverError (INVALID_TIMEOUT).Attachment.storage_uri and the OtpResponse alias are gone: use attachment.url and
OtpResult.From 1.x, also: wait_for and wait_for_otp raise ReceiverTimeoutError instead of
returning None. See CHANGELOG.md.
pip install -e ".[dev]"
pytest
mypy receiverdotemail
python scripts/generate_sync.py # after changing the async client: regenerates receiverdotemail/_sync/
Or from the repo root: ./scripts/test.sh python-sdk.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.