GithubHelp home page GithubHelp logo

dedinc / freetempmail Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 0.0 91 KB

Temp-Mail.org API wrapper.

Home Page: https://pypi.org/project/freetempmail/

License: MIT License

Python 100.00%
api api-wrapper python python-3 python-module temp-mail temp-mail-api tempmailorg

freetempmail's Introduction

freetempmail - Temp-Mail.org API wrapper.

How to Use?

Quickstart Guide

import asyncio
from freetempmail import FreeTempMail

if __name__ == '__main__':
    ftm = FreeTempMail()  # Instantiate class
    asyncio.run(ftm.generate_mail())  # Generate a temporary mail
    email = ftm.get_email()  # Fetch email info
    print(email)

    messages = ftm.get_messages()  # Fetch messages in mailbox
    print(messages)

    message_id = messages[0]['_id']  # Fetch a specific message by ID
    message_content = ftm.get_message(message_id)
    print(message_content)

Receive and Process a New Message

import asyncio
from freetempmail import FreeTempMail

if __name__ == '__main__':
    ftm = FreeTempMail()  # Instantiate class
    asyncio.run(ftm.generate_mail())  # Generate a temporary mail
    email = ftm.get_email()  # Fetch email info
    print(email)

    new_message = ftm.wait_message()  # Wait and fetch a new message
    print(new_message)

freetempmail's People

Contributors

dedinc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

freetempmail's Issues

Is it still working?

Hi! Is it still working?
This error appears on startup:

Traceback (most recent call last):
File "mal1.py", line 5, in
email = ft.getEmail() #returns email
File "/usr/local/lib/python3.10/dist-packages/freetempmail/freetempmail.py", line 52, in getEmail
return s.get('https://web2.temp-mail.org/mailbox', headers=authHeaders).json()['mailbox']
NameError: name 's' is not defined

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.