On Feb 25, 2:48 pm, prabhakar <[email protected]> wrote: > How could i read a mail from SMTP server through python script. > I know how to send an email through python script. Is there any way to > read a mail ? > > Here i used snipped of code for read a mail from server. It is not > working properly, please find it. > > import getpass, poplib > M = poplib.POP3( 'SMTP server Name' ) > M.user(getpass.getuser()) > M.pass_(getpass.getpass()) > numMessages = len(M.list()[1]) > for i in range(numMessages): > for j in M.retr(i+1)[1]: > print j > > Please suggest me what are the modules required to read a mail and > give me one simple example, it would be great helpful.
-- You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
