Skip to main content

A clean, modular Python client for YOPmail disposable email service with send and RSS functionality

Project description

๐Ÿ“ง YOPmail Client

Python License Status Version Release

โš ๏ธ 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

  • ๐Ÿ” 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

๐Ÿš€ Quick Start

Installation

# Clone the repository
git clone https://github.com/firasguendouz/yopmail_auto.git
cd yopmail_auto

# Install dependencies
pip install -r requirements.txt

# Install the package
pip install -e .

Basic Usage

from yopmail_client import YOPMailClient

# 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

Rate Limiting

config = {
    "rate_limit_detection": True,
    "rate_limit_delay": 2.0,  # seconds
    "max_retries": 3
}

messages = check_inbox("mailbox", config=config)

Proxy Support

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/firasguendouz/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


Made with โค๏ธ for the Python community

GitHub stars GitHub forks

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yopmail_client-1.2.2.tar.gz (32.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yopmail_client-1.2.2-py3-none-any.whl (35.9 kB view details)

Uploaded Python 3

File details

Details for the file yopmail_client-1.2.2.tar.gz.

File metadata

  • Download URL: yopmail_client-1.2.2.tar.gz
  • Upload date:
  • Size: 32.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.18

File hashes

Hashes for yopmail_client-1.2.2.tar.gz
Algorithm Hash digest
SHA256 5c089984e37e326cd3fb794292753679d85e1101069f8ae6be5c00cad67638f9
MD5 cabc83366d4a67e122f6a74c1dd7f5e1
BLAKE2b-256 70021be37fccd668007c01bed3328ccdb0dc7735c8b111e2fea51a06cc3ff65f

See more details on using hashes here.

File details

Details for the file yopmail_client-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: yopmail_client-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 35.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.18

File hashes

Hashes for yopmail_client-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4ca40a0ea94f365cb2f9245b91607556e8a0952b3f26cd4402d01ac95bdfb089
MD5 ebdd4063f9dfb315b33ed5f5c0f2f14c
BLAKE2b-256 de806f3eafab425767d24bf561cfecbcf3eccb26586ec89b1b6b5e9fc246bf61

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page