?
=?ISO-8859-1?Q?Andr=E9_Nobre?=
Hello,
i´m starting with python and i made this little piece of code, to know
if i have new mails to receive.
import poplib, getpass
arquivo = 'mails.txt'
info = file(arquivo).read().split('\n')
d = {}
for e in info:
a = e.split('\t')
print "Verificando e-mail de %s" % (a[1],)
p = poplib.POP3(a[0])
p.user(a[1])
p.pass_(getpass.getpass())
print "\n%s mensagens em seu mailbox.\n" % p.stat()[0]
p = None
print "Final"
it gets some information from mails.txt* file and watch new mails. I
want to know how to leave this code running as service under windows and
send a warning message (like that windows popup messages) when a there
is a new e-mail.
* my file is like this (simple text)
mailserver \t maillogin \n
Tkz and sorry about my english....
i´m starting with python and i made this little piece of code, to know
if i have new mails to receive.
import poplib, getpass
arquivo = 'mails.txt'
info = file(arquivo).read().split('\n')
d = {}
for e in info:
a = e.split('\t')
print "Verificando e-mail de %s" % (a[1],)
p = poplib.POP3(a[0])
p.user(a[1])
p.pass_(getpass.getpass())
print "\n%s mensagens em seu mailbox.\n" % p.stat()[0]
p = None
print "Final"
it gets some information from mails.txt* file and watch new mails. I
want to know how to leave this code running as service under windows and
send a warning message (like that windows popup messages) when a there
is a new e-mail.
* my file is like this (simple text)
mailserver \t maillogin \n
Tkz and sorry about my english....