SHARE
TWEET

Untitled




Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- result, data = mail.uid('search', None, "UNSEEN")
- if result == 'OK':
- print (data[0].split())
- for num in data[0].split():
- try:
- result, data = mail.uid('fetch', num, '(RFC822)')
- if result == 'OK':
- msg = email.message_from_bytes(data[0][1])
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.