I have been looking on the internet for a simple script on if you can monitor your gmail inbox, and to let the user know when a new email has arrived. So far surprisingly, I haven't found anything at all. I just need a script to check every few seconds if you have received a new email. It would be put in an 'if' statement, and it would do something once you have received an email. The checking would take place in a while loop, and it pauses every so often, and then it checks if you have received a new email. This may sound simple, but I cannot find anything online.
CodePudding user response:
https://developers.google.com/gmail/api/guides/push
I don't know which mail domain you are using, so I'm sending the gmail's doc. You can loop the API and easily do what you want.
CodePudding user response:
Unless I'm mistaken, you want to listen to your gmail mailbox. If so, here is a clue that will really help you email-listener 1.2
.
It is a python module which allows to listen to a mail server (Gmail). For more details go to the documentation here