Quantcast
Channel: Go4Expert
Viewing all articles
Browse latest Browse all 1987

Python imaplib Yahoo error

$
0
0
Want to search folder "SPAM", for specific_user@any domain, and delete found mail.

Code below ...
Code:
import imaplib

box = imaplib.IMAP4_SSL('imap.mail.yahoo.com', 993)
box.login("xxxxxxxx@yahoo.com","xxxxxxxxxx")
box.select('SPAM')
typ, data = box.search(None, 'from','name@*.*')
for num in data[0].split():
   box.store(num, '+FLAGS', '\\Deleted')
box.expunge()
box.close()
box.logout()
... is generating these errors below, please assist in debugging, thanks.

Code:
Traceback...
Python imaplib Yahoo error

Viewing all articles
Browse latest Browse all 1987

Trending Articles