A secure, licensed Python client for YOPmail disposable email service with license validation, send and RSS functionality
Project description
๐ง YOPmail Client
โ ๏ธ IMPORTANT DISCLAIMER: This project is for educational purposes only. Please use responsibly and in accordance with YOPmail's terms of service. The authors are not responsible for any misuse of this software.
๐ฏ Overview
A clean, modular Python client for interacting with YOPmail disposable email service. Built with modern Python practices, comprehensive error handling, and a simple API for easy integration.
โจ Key Features
- ๐ License Protection - Secure license validation using KeyAuth cloud service
- ๐ก๏ธ Secure Authentication - Robust cookie management and session handling
- ๐ฌ Message Management - List, fetch, and process emails efficiently
- ๐ค Send Messages - Send emails to other YOPmail addresses
- ๐ก RSS Feeds - Get RSS feed URLs and data for any YOPmail address
- ๐ก๏ธ Rate Limiting - Built-in protection against service limits
- ๐ Proxy Support - Advanced proxy rotation capabilities
- ๐ Comprehensive Logging - Detailed operation tracking
- ๐๏ธ CLI Interface - Easy command-line access
- ๐ Type Safety - Full type annotations throughout
- โ๏ธ Simple Configuration - Easy setup with
yopmail_config.py
๐ Quick Start
Prerequisites
โ ๏ธ License Required: This client now requires a valid license key to function. You must:
- Purchase a License: Contact the developer to obtain a license key
- Create Configuration: Set up
yopmail_config.pywith your license key - Install Dependencies: Install all required packages including KeyAuth
License Setup
Create a yopmail_config.py file in your project directory:
# yopmail_config.py
API_KEY = "YOUR_LICENSE_KEY_HERE" # Required: Get from developer
PROXY_URL = None # Optional: "http://proxy:8080"
PROXY_LIST = None # Optional: ["http://proxy1:8080", "http://proxy2:8080"]
PROXY_ROTATION = False # Optional: Enable proxy rotation
โ ๏ธ Important: Without a valid license key, the client will raise a LicenseError and refuse to operate.
Development Mode
For development and testing, you can skip license validation:
from yopmail_client import YOPMailClient
# Skip license check for development
client = YOPMailClient("test@yopmail.com", skip_license_check=True)
Installation
# Clone the repository
git clone https://github.com/DeGanLabs/yopmail_auto.git
cd yopmail_auto
# Install dependencies (includes KeyAuth for license verification)
pip install -r requirements.txt
# Install the package
pip install -e .
License Setup
-
Create Configuration File:
# yopmail_config.py API_KEY = "YOUR_LICENSE_KEY_HERE" # Get this from the developer PROXY_URL = None # Optional: "http://proxy:8080"
-
Get Your License Key: Contact the developer to purchase a license
-
Test Your Setup:
python test_license_integration.py
Development Setup
For developers working on the project:
# Set up development environment
python setup_dev_env.py
# Configure environment variables
# Edit .env file with your KeyAuth credentials
# Test the setup
python keyauth_example.py
CI/CD Deployment
The project includes automated CI/CD with GitHub Actions:
- CI workflow (
.github/workflows/ci.yml): Tests on every push/PR - PyPI Release workflow (
.github/workflows/pypi-release.yml): Publishes to PyPI on release - Multi-Python version testing (3.8-3.12)
- Cross-platform compatibility (Windows, Linux, macOS)
- License integration tests with KeyAuth credentials
- Security scanning with Bandit and Safety
- Automatic PyPI publishing on release
- CI environment support - Gracefully handles missing config files in CI
Note: CI environments automatically skip license validation when KeyAuth is not available, ensuring tests pass across all platforms.
See DEPLOYMENT_GUIDE.md for complete setup instructions.
Basic Usage
from yopmail_client import YOPMailClient, LicenseError
try:
# The client will automatically validate your license key
client = YOPMailClient("your_mailbox")
client.open_inbox()
messages = client.list_messages()
for message in messages:
print(f"Subject: {message.subject}")
except LicenseError as e:
print(f"License validation failed: {e}")
# Handle license error appropriately
# Create client and send a message
with YOPMailClient("yourmailbox") as client:
client.open_inbox()
# Send a message to another YOPmail address
result = client.send_message(
"recipient@yopmail.com",
"Test Subject",
"This is a test message"
)
print(f"Message sent: {result['success']}")
# List messages
messages = client.list_messages()
for msg in messages:
print(f"Subject: {msg.subject}")
๐ Essential API
Core Functions
| Function | Description | Parameters |
|---|---|---|
client.open_inbox() |
Initialize inbox access | None |
client.list_messages(page) |
List messages in inbox | page: int = 1 |
client.fetch_message(msg_id) |
Fetch specific message content | msg_id: str |
client.send_message(to, subject, body) |
Send email to YOPmail address | to: str, subject: str, body: str |
client.get_inbox_info() |
Get inbox overview | None |
Advanced Usage
from yopmail_client import YOPMailClient
# Full client control with send functionality
with YOPMailClient("mailbox") as client:
client.open_inbox()
# Send a message
result = client.send_message(
"recipient@yopmail.com",
"Important Update",
"This is an important message with details..."
)
# Get RSS feed URL
rss_url = client.get_rss_feed_url("mailbox")
print(f"RSS URL: {rss_url}")
# Get RSS feed data
rss_data = client.get_rss_feed_data("mailbox")
print(f"RSS has {rss_data['message_count']} messages")
# List and process messages
messages = client.list_messages()
for msg in messages:
content = client.fetch_message(msg.id)
print(f"Subject: {msg.subject}")
print(f"From: {msg.sender}")
print(f"Content: {content[:100]}...")
๐ฅ๏ธ Command Line Interface
# List all messages
yopmail-client yourmailbox --list
# Show detailed message information
yopmail-client yourmailbox --list --details
# Fetch specific message content
yopmail-client yourmailbox --fetch MESSAGE_ID
# Send an email message
yopmail-client yourmailbox --send --to "recipient@yopmail.com" --subject "Test Subject" --body "Test message body"
# Get RSS feed URL
yopmail-client yourmailbox --rss
# Get RSS feed data
yopmail-client yourmailbox --rss-data
๐๏ธ Architecture
Project Structure
yopmail-client/
โโโ ๐ modules/
โ โโโ ๐ yopmail_client/
โ โโโ ๐ client.py # Core client implementation
โ โโโ ๐ simple_api.py # Essential API functions
โ โโโ ๐ constants.py # Configuration constants
โ โโโ ๐ cookies.py # Cookie management
โ โโโ ๐ exceptions.py # Custom exceptions
โ โโโ ๐ utils.py # Utility functions
โ โโโ ๐ cli.py # Command-line interface
โ โโโ ๐ proxy_manager.py # Proxy rotation
โโโ ๐ artifacts/
โ โโโ ๐ api_summary.json # API documentation
โโโ ๐ requirements.txt # Dependencies
โโโ ๐ setup.py # Package configuration
โโโ ๐ README.md # This file
Design Principles
- ๐ง Modularity - Clean separation of concerns
- ๐ก๏ธ Security - Safe handling of credentials and sessions
- ๐ Scalability - Built for high-volume operations
- ๐ Observability - Comprehensive logging and monitoring
- ๐ฏ Simplicity - Easy-to-use API design
โ๏ธ Configuration
License Configuration
Required: Create yopmail_config.py in your project directory:
# yopmail_config.py
API_KEY = "YOUR_LICENSE_KEY_HERE" # Required: Get from developer
PROXY_URL = None # Optional: "http://proxy:8080"
PROXY_LIST = None # Optional: ["http://proxy1:8080", "http://proxy2:8080"]
PROXY_ROTATION = False # Optional: Enable proxy rotation
Rate Limiting
config = {
"rate_limit_detection": True,
"rate_limit_delay": 2.0, # seconds
"max_retries": 3
}
messages = check_inbox("mailbox", config=config)
Proxy Support
# Via yopmail_config.py (recommended)
PROXY_URL = "http://proxy:8080"
PROXY_LIST = ["http://proxy1:8080", "http://proxy2:8080"]
PROXY_ROTATION = True
# Or via config parameter
config = {
"proxy_enabled": True,
"proxy_list": [
"http://proxy1:8080",
"http://proxy2:8080"
],
"proxy_rotation": True
}
๐งช Testing
# Run all tests
pytest tests/
# Run with coverage report
pytest --cov=modules.yopmail_client tests/
# Run specific test file
pytest tests/test_client_basic.py
๐ Performance
- โก Fast Response - Optimized HTTP requests
- ๐ Connection Pooling - Efficient resource usage
- ๐ Rate Limiting - Automatic backoff strategies
- ๐ Proxy Rotation - Load distribution across proxies
๐ค Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
Development Setup
# Clone and setup development environment
git clone https://github.com/DeGanLabs/yopmail_auto.git
cd yopmail_auto
# Install development dependencies
pip install -r requirements-dev.txt
# Run tests
pytest tests/
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
โ ๏ธ Legal Notice
This software is provided for educational and research purposes only.
- ๐ซ No Spam - Do not use for sending unsolicited emails
- ๐ซ No Abuse - Respect YOPmail's terms of service
- ๐ซ No Commercial Use - Not intended for commercial applications
- โ Educational Use - Perfect for learning email automation
- โ Research - Ideal for academic and research projects
The authors are not responsible for any misuse of this software.
๐ Support
- ๐ง Issues: GitHub Issues
- ๐ Documentation: Wiki
- ๐ฌ Discussions: GitHub Discussions
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yopmail_client-1.3.2.tar.gz.
File metadata
- Download URL: yopmail_client-1.3.2.tar.gz
- Upload date:
- Size: 37.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
035eeaae5f5b96d9e4fb2dc3f54b74de1926f38eb7be232e57f738297558aa72
|
|
| MD5 |
f482af4142b7cc5bb8a1ac38df1c3679
|
|
| BLAKE2b-256 |
8e29939bbe56a5905167bf4dea07b700f81f5079159146f781694d855ba40afe
|
File details
Details for the file yopmail_client-1.3.2-py3-none-any.whl.
File metadata
- Download URL: yopmail_client-1.3.2-py3-none-any.whl
- Upload date:
- Size: 39.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7763ab24f38129edd67d85c33d3e6298f40714a3d71bcdaeb7d572a45dcf848d
|
|
| MD5 |
23019646b338bd63adfd67fe58dcd67c
|
|
| BLAKE2b-256 |
3be8bae43334aba317dfa6d53d9ad1f921210ce0fbe820ca8b55de6fc449930f
|