Skip to main content

Get temp mails and verification codes.

Project description

Minutes Mail - Temporary Email Manager

This is a Python library that provides a convenient way to create and manage temporary email addresses using two different services: 1secmail.com and rapidapi.com.

Features

  • Create temporary email addresses
  • Retrieve a list of available domains for email creation
  • Read emails received in the temporary inbox and extract activation codes
  • Delete temporary email addresses (only supported for 1secmail)

Installation

  1. Clone the repository or download the source code.
  2. Install the required dependencies:
pip install minutes-mail

Usage

  1. Import the MinutesMail class:
from minutes_mail import MinutesMail
  1. Create an instance of the MinutesMail class, specifying the email_type, rapid_api_key, and proxy_url as needed:
# With Rapid API Key
mail = MinutesMail.create_instance(
    email_type="rapid_api",
    rapid_api_key="your_rapid_api_key",
    proxy_url="http://your_proxy_url"
)

# Without Rapid API Key (1SecMail)
mail = MinutesMail.create_instance(
    email_type="1secmail",
    proxy_url="http://your_proxy_url"
)

The create_instance method will automatically create an instance of either RapidMail or OnesecMail based on the provided email_type and whether a rapid_api_key is supplied.

  1. Use the available methods to manage the temporary email:
# Create a new email address
email = mail.create_mail()

# Get available domains
domains = mail.get_domains()

# Read emails and extract activation code
code = mail.get_activation_code(max_wait_minutes=3)

# Delete the email (only supported for 1SecMail)
mail.delete_email(email=email)

Code Structure

  • base_class.py: Contains the BaseClass, defining common interfaces and properties for email services.
  • inboxes_mail.py: Implements the OnesecMail class to interact with the 1secmail.com API.
  • rapid_mail.py: Implements the RapidMail class to interact with the privatix-temp-mail-v1.p.rapidapi.com API.
  • mail.py: Provides the factory method create_instance to create an instance of RapidMail or OnesecMail.

Dependencies

  • loguru: For logging.
  • httpx: For making HTTP requests.

Contributing

Contributions are welcome! Please open an issue or submit a pull request if you have any improvements or bug fixes.

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

minutes_mail-1.0.3.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

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

minutes_mail-1.0.3-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file minutes_mail-1.0.3.tar.gz.

File metadata

  • Download URL: minutes_mail-1.0.3.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for minutes_mail-1.0.3.tar.gz
Algorithm Hash digest
SHA256 671219cd2b56017afab77a010aff36a96f15ca6deb949a4395964520d2275c9d
MD5 927da65b7f6e75ac55aaab539de8fd36
BLAKE2b-256 5d38a9f919960f4e28f9cdea295937f21223931917845fb30c3d0fe1458159fd

See more details on using hashes here.

File details

Details for the file minutes_mail-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: minutes_mail-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 2.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for minutes_mail-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e3cc1a09d20395b570fd9bca9249765c0e228affbc124cb8090e6bd4c6764d00
MD5 f1f692e7af16d2f6e84db8205a510dea
BLAKE2b-256 439c6a90b9403394ec9fa5eccbe79b83aa7d2eed75ff8eb8cfee73b1cf2b6907

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