SmailPro API
A Python wrapper for the SmailPro temporary email service, supporting multiple email providers and automated CAPTCHA bypassing via an external solver service.
Features
- Multi-Provider Support: Create temporary emails from Google (Gmail), Microsoft (Outlook/Hotmail), and other providers.
- Inbox & Message Fetching: Easily fetch and read emails from created temporary addresses.
- Configurable CAPTCHA Solver: Integrates with any Boterdrop-Solver-compatible service. Server URL is fully configurable.
- Type Hints: Full type annotations for better IDE support.
Installation
pip install smailpro-api
Prerequisites
This library requires a running CAPTCHA solver service to handle Cloudflare Turnstile challenges. The Boterdrop-Solver is recommended. It can be run via Docker using the Dockerfile and docker-compose.yml provided in the solver setup.
Usage
from smailpro_api import SmailProAPI, Provider
# Initialize the API
api = SmailProAPI(
provider=Provider.GOOGLE,
solver_url="http://localhost:8000" # Your solver service URL
)
# Create a new temporary email
email_info = api.create_email()
print(f"Created email: {email_info['address']}")
# Wait for emails to arrive
import time
time.sleep(5)
# Fetch the inbox
inbox = api.fetch_inbox(email_info)
print(f"Found {len(inbox.get('messages', []))} messages.")
# Read a specific message
if inbox.get('messages'):
first_msg_id = inbox['messages'][0]['mid']
message_content = api.fetch_message(email_info, first_msg_id)
print(f"Message body: {message_content.get('body')}")
Supported Providers
| Provider | Default Domain | Available Domains |
|---|---|---|
google |
gmail.com | gmail.com, googlemail.com |
microsoft |
outlook.com | outlook.com, hotmail.com, outlook.kr, outlook.fr, outlook.com.vn, outlook.co.id, outlook.co.th, outlook.com.ar, outlook.co.il |
other |
melbourne.edu.pl | melbourne.edu.pl, sydney.edu.pl, tokyo.edu.pl, storegmail.net |
Configuration Options
| Parameter | Type | Default | Description |
|---|---|---|---|
provider |
Provider |
Provider.GOOGLE |
Email provider to use |
solver_url |
str |
"http://127.0.0.1:8000" |
URL of the CAPTCHA solver service |
session_token |
Optional[str] |
None |
Optional session token to bypass CAPTCHA |
user_agent |
str |
Chrome 120 UA | User agent string for requests |
captcha_retry_max |
int |
2 |
Maximum retries for CAPTCHA solving |
captcha_poll_interval |
float |
2.0 |
Interval between CAPTCHA poll requests (seconds) |
captcha_poll_timeout |
int |
60 |
Maximum time to wait for CAPTCHA solving (seconds) |
Troubleshooting
- 403 Forbidden: Ensure the solver service is running and accessible. Check that the
solver_urlis correct. - CAPTCHA Timeout: If solving takes too long, increase
captcha_poll_timeout. - Memory Issues (Solver): If using Docker for the solver, ensure the container has enough memory allocated.
License
MIT License
Metadata
Release files for smailpro-api 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| smailpro_api-1.0.0.tar.gz | 7.4 kB | Without provenance | Details for smailpro_api-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| smailpro_api-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for smailpro_api-1.0.0-py3-none-any.whl |
Total release size: 14.2 kB
Release files / smailpro_api-1.0.0.tar.gz
| Download URL | smailpro_api-1.0.0.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f56cc07986e40453078c52c93194da8b655c1a797dc55e87dd5a31617f00fa0d
|
|
BLAKE2b-256 checksum How to use checksums |
9cc40ca536ed5618f5054ab73b65cded0becc93d9af97252868b8d6aa69f4be0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / smailpro_api-1.0.0-py3-none-any.whl
| Download URL | smailpro_api-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
95d1ddd57cde413c4102a214f3f87d158b265b6047e6cebaeaa905f040f19fbe
|
|
BLAKE2b-256 checksum How to use checksums |
2776cfa5970cb7785ae67197ac5449a4430333f2bc56be7a85631fdf358ab17e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for smailpro-api 1.0.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.