Python 3 Projects
Python Gmail Checker
I'm going to show you step by step how to run python script for checking Gmail. I wrote that will run every hour through windows task scheduler and open up Gmail if you have any unread messages.
Step 1 : Download Python
Download it from here
Step 2 : Download PyCharm
Step 3 : In PyCharm Create .py File
Step 4 : Put Code Into File and Run
Replace USERNAME with the part in your email address before the @ and PASSWORD with your password.
import imaplib
import webbrowser
obj = imaplib.IMAP4_SSL('imap.gmail.com'.'993')
obj.login('USERNAME','PASSWORD')
obj.select() unread = str(obj.search(None,'UNSEEN'))
print(unread)
print(len(unread) - 13)
if (len(inread) - 13)>0:webbrowser.open('http://gmail.com')
Run the file by clicking run then the file name.
Step 5: Open windows task scheduler
Search for windows task scheduler in the program search bar.




Post a Comment
0 Comments