owainlewis / clojure-mail

A Clojure library for parsing, downloading and reading email from IMAP servers.
202 stars 54 forks source link

Gmail IMAPS behaviour #44

Open acron0 opened 8 years ago

acron0 commented 8 years ago

Hi there,

So, I don't claim to know a great deal about IMAPS so I'm willing to have my understanding amended. I found clojure-mail because I want to do some processing on emails received at a GMail address, ideally as soon as they arrive.

Straight off, I just tried the "Watching a folder" example from the README, putting in my own credentials. A few errors later and I figured out it needed a) IMAP support and b) 'Less secure app' support both to be enabled in GMail. After that, no errors but no events being received despite sending e-mails to the address. And I have no idea how to debug it.

Next attempt was just to try and get the unread messages out of the inbox. This was successful, until I put the process in a loop with a 3 second delay. After roughly 10-15 successful reports of unread mail count, it hangs indefinitely.

Is there something I can do to either fix either of these approaches? Thanks for any advice you can give me

paultopia commented 8 years ago

I'm also having very difficult to debug problems. Even with imap and less secure app support enabled, every time I try to create a connection as specified in the readme it just times out. Has gmail changed some back-end config or something?

agofilo commented 5 years ago

It isn't the idle-manager the problem. Most parts of IMAP servers closes the connection after some time, the idlemanger object is still running but doesn't get the event from the server.