Skip to content

TheClassifier/PyEnator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PyEnator

Python Class for emailnator.com aka Gmailnator

Features:

  • Get a temp gmail
  • Check inbox
  • Get email content (html/text)

Usage:

import sys
from time import sleep
from GmLib import Gmail

gmail = Gmail() # init the class

email_address = gmail.new_email() # get an email (gmail)

inbox = gmail.get_inbox(email_address) # get the inbox

while len(inbox) == 0: # watch the inbox until an email is received 
    sys.stdout.write("\rWaiting for email.")
    sys.stdout.flush()
    sys.stdout.write("\rWaiting for email..")
    sys.stdout.flush()
    sys.stdout.write("\rWaiting for email...")
    sys.stdout.flush()
    messages = gmail.get_inbox(email_address) # refresh inbox
    sleep(1) # sleep for 1 sec

for message in messages: # for each msg
  message_body = gmail.get_message_body(email_address, message["messageID"]) # get message content / body
  print(message_body) # print contents of the message received 
  

About

Python Class for emailnator.com aka Gmailnator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages