[Tutor] Use python to parse the subject line of emails, listen for and react to commands

Willie Sims willie14228 at outlook.com
Thu Feb 26 21:51:00 CET 2015


Hello I have been trying to figure out a way to parse the subject line of new emails in Gmail, the subject line will be commands for another python script. I know this isn't the most secure way of doing things but it is for a Beagle Bone, I'm really new to python and don't know of this is even possible though I don't see why not. The way I thought it would work would to have py check email subject lines coming from one sender when it sees a subject  "Command(the command to follow)" it would then start another py script with that command, or otherwise sees the subject Settings(the item to change(the change)) it would change a settings page.
I haven't found any examples of using py to loop back on itself like this, mostly I'm sure because this is not secure and easy to hack and clunky for remote access, 
I know py can parse emails,  but I cant figure out how to limit to only the subject and only if its in that certain format and only if its coming from a recognized email address and since I'm using 3.4 it seems all the other kind of examples don't work half the time anyway.
can someone point me in the right direction  


More information about the Tutor mailing list