Install software:

opkg update
opkg install python-openssl 
opkg install distribute 
easy_install email
nano /mnt/sda1/
import poplib
import time
from email.Parser import Parser
parser = Parser()
server = poplib.POP3_SSL("", 995)
print server.user("my_gmail_address")
print server.pass_("my_password")
def getMsgCount():
# check message count by stat() and list() functions
        numMsgs = server.stat()[0]
        print "Num msg by stat():", numMsgs
        print "Num msg by list():", len(server.list()[1])
        print "Most recent:", numMsgs, getSubj(numMsgs)
def getSubj(which):
# return subject of message with id 'which'
        msg = "\n".join(, 1)[1])
        email = parser.parsestr(msg)
        return email.get("Subject")
while True:
        print "--"
chmod 755 /mnt/sda1/


Comments powered by CComment