Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## yamail.py [python]
- #!/usr/bin/python
- # -*- coding: utf-8 -*-
- import imaplib
- username = "***"
- password = "***"
- host = "imap.yandex.ru"
- port = 993
- m = imaplib.IMAP4(host,port)
- m.login = (username, password)
- n = m.recent()
- if n == 0:
- print "0 new"
- else:
- print str(n)+" new"
Add Comment
Please, Sign In to add comment