Skip to main content

SmakMail examples

Minimal examples and a small Python client for working with SmakMail receive-only mailboxes.

SmakMail provides persistent receive-only mailboxes for incoming messages, registrations, verification codes and automation. Purchased mailboxes can be accessed through Webmail, IMAP, POP3 and the SmakMail HTTP API.

Protocols

  • IMAP: imap.smakmail.com, port 993, SSL/TLS
  • POP3: pop3.smakmail.com, port 995, SSL/TLS
  • Login: full mailbox email address
  • Password: mailbox password from the issued order

SmakMail mailboxes are receive-only. These examples do not configure SMTP or outbound sending.

Compatibility with any specific third-party service is not guaranteed.

Examples

  • examples/imap_read.py — list recent message headers over IMAP without marking messages as read
  • examples/pop3_list.py — list messages over POP3 without deleting them
  • examples/tls_check.sh — verify TLS connectivity to IMAP and POP3
  • examples/api_read.py — read mailbox messages and the latest extracted verification code through the HTTP API
  • .env.example — environment variable names used by the scripts

Python API client

This repository includes a minimal Python client for the verified mailbox-read API surface.

Install from the repository:

python -m pip install git+https://github.com/smakprojectsup/smakmail-examples.git

The package metadata is also prepared for publishing as smakmail-client on PyPI. Until the first PyPI release is actually published, use the GitHub install command above rather than assuming a PyPI package exists.

Example:

import os

from smakmail_client import SmakMailClient

client = SmakMailClient(os.environ["SMAKMAIL_API_KEY"])

messages = client.mailbox_messages(
    os.environ["SMAKMAIL_EMAIL"],
    mailbox_password=os.environ.get("SMAKMAIL_MAILBOX_PASSWORD"),
)
print(messages)

latest_code = client.mailbox_latest_code(
    os.environ["SMAKMAIL_EMAIL"],
    mailbox_password=os.environ.get("SMAKMAIL_MAILBOX_PASSWORD"),
)
print(latest_code)

The API key is sent as Authorization: Bearer <API_KEY> and identifies the API caller. X-Mailbox-Password is sent when mailbox_password is provided. It is used for credential-authorized mailbox reads where required. Reading a mailbox owned by another SmakMail account with mailbox credentials is a Developer API capability and does not grant access to that owner's account, billing, API keys or mailbox management.

The client intentionally returns the live API JSON as-is instead of freezing response schemas in this repository.

OpenAPI

openapi.yaml provides a partial OpenAPI 3.1 description of the verified public read surface used by the Python client:

  • GET /me
  • GET /mailbox/messages?email=...
  • GET /mailbox/latest-code?email=...

The spec deliberately leaves response bodies open-ended instead of inventing undocumented fields.

Current API documentation:

IMAP and POP3 documentation

Product overview

Security

Do not commit real API keys or mailbox credentials. Use environment variables or a local .env file excluded from version control.

About SmakMail

https://smakmail.com

Metadata

Release files for smakmail-client 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for smakmail-client 0.1.1
File Size Uploaded
smakmail_client-0.1.1.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for smakmail-client 0.1.1
File Interpreter ABI Platform
smakmail_client-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.7 kB

Release files / smakmail_client-0.1.1.tar.gz

Download URL smakmail_client-0.1.1.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f340fc4c66056cfd5b9a89e0f8758d35b66b2d947d7a464deeffeff4a3b0cfe6
BLAKE2b-256 checksum
How to use checksums
6501457bd385624038ade833e47b60aba12121e07415c7567fd1278ba63721d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

Release files / smakmail_client-0.1.1-py3-none-any.whl

Download URL smakmail_client-0.1.1-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2abc06723c90b4ff60889550110731a022190baacd8bd54eae150da344e416d5
BLAKE2b-256 checksum
How to use checksums
d551317f3888d3372f39683fa638bb122ecd2292ec1120ba52ed9012649a9d65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page