How do you iterate through each email in your inbox using python?

Posted by djblue2009 on Stack Overflow See other posts from Stack Overflow or by djblue2009
Published on 2010-06-06T09:02:13Z Indexed on 2010/06/06 9:12 UTC
Read the original article Hit count: 259

Filed under:
|
|
|

I'm completely new to programming and I'm trying to build an autorespoder to send a msg to a specific email address.

Using an if statement, I can check if there is an email from a certain address in the inbox and I can send an email, but if there are multiple emails from that address, how can I make a for loop to send an email for every email from that specific address.

I tried to do use this as a loop:

for M.search(None, 'From', address) in M.select(): 

but I get the error: "can't assign to function call" on that line

© Stack Overflow or respective owner

Related posts about python

Related posts about email