Forums

Read emails from Gmail

Is there a way using free account in pythonanywhere to create mail listner that will triger every time that new email was sent to the given gmail account?

If you have POP enabled for your account, you could write something that polls the mailbox and checks if anything new has arrived.

But gmail is not in the whitelist.

It should still work; Gmail is kept open to free users via SMTP, POP and IMAP through a separate mechanism.

Alternatively, you could take a look at the Gmail API -- that's hosted on www.googleapis.com, which is whitelisted.

Hi, I'm trying to implement the QUickstart tutorial for the GMail API. I'm getting an error: FileNotFoundError: [Errno 2] No such file or directory: 'static/credentials.json'

Where do I need to put the credentials.json file?

See https://help.pythonanywhere.com/pages/NoSuchFileOrDirectory/