[EMAIL PROTECTED] wrote: > I m trying to create something simple a mailing list similar to yahoo > groups > I m stumbling at the part where the python recieves messages via say > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > > how to make python recieve emails and process it > after that it is straight forward processing in python inserting in db etc
Can you use POP to access Yahoo groups? If so, this script will get you started: #!/usr/bin/python """ Redirect the output to a file to capture the contents of the mailbox. """ host = 'foo.com' account = 'jennyjenny' password = '8675309' import getpass, poplib M = poplib.POP3(host) #M.user(getpass.getuser()) #M.pass_(getpass.getpass()) M.user(account) M.pass_(password) numMessages = len(M.list()[1]) for i in range(numMessages): for j in M.retr(i+1)[1]: print j -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy -- http://mail.python.org/mailman/listinfo/python-list