Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tempmailwrapper

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tempmailwrapper

API wrapper for Temp Mail API.

  • 0.0.7
  • PyPI
  • Socket score

Maintainers
1

tempmailwrapper

This is an improved and updated version of the outdated Github project Tempmail. Changes:

  • Completely up to date with the new Temp Mail API on RapidAPI.
  • Full Python3 support
  • Code improvements

Description

Python API wrapper for Temp Mail. Disposable email - is a free email service that allows to receive email at a temporary address that self-destructed after a certain time elapses. You can view full API specification in here or here.

Prerequisites

  • Python 3.X

Installation

$ pip install tempmailwrapper

Usage

Start by navigating to RapidAPI to obtain an API key. Create an account, fill in your details and subscribe to one of the plans. There's a free plan allowing for up to 100 request/day for free.

Once you have the API key, you can follow these examples:

Setting up a temporary email:

$ from tempmailwrapper import tempmailwrapper
$ tm = tempmailwrapper.TempMail(api_key="YOUR_API_KEY_HERE")
$ random_email_address = tm.get_email_address()
$ specific_email_address = tm.get_email_address(username='testing', domain='subcaro.com')

Get list of all emails for an email address:

$ from tempmailwrapper import tempmailwrapper
$ tm = tempmailwrapper.TempMail(api_key="YOUR_API_KEY_HERE")
$ email_address = tm.get_email_address()
$ print(random_email_address) # Now send an email here.
$ emails_list = tm.get_emails(email_address)

Get specific email:

$ from tempmailwrapper import tempmailwrapper
$ tm = tempmailwrapper.TempMail(api_key="YOUR_API_KEY_HERE")
$ email_address = tm.get_email_address()
$ print(email_address) # Now send an email here.
$ emails_list = tm.get_emails(email_address)
$ first_email_id = emails[0]['mail_id']
$ email = tm.get_one_message(first_email_id)
$ print(email.text) # Tip: use a library like BeautifulSoup to navigate your way easier through HTML-formatted emails.


Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc