Varying the frequency of IMAP connections (email node)

I'm using the email node to check for the presence of an email in a specified IMAP folder.

Ideally I'd like to be able to vary the frequency of connecting to IMAP. Am I right in saying it's not possible with the default email node?

Is there another node that might be suitable?

The reason is that I want to check every 5 seconds when my Node-RED alarm system is armed (via a dashboard button) but when it's not, check every 5 minutes.

right now no - but there is this open issue to create a version that does it...
if only someone had the time to create the Pul Request.

IMAP push would be a nice enhancement as well! Then you wouldn't need to poll if you had a suitable IMAP server.

Be my guest !

1 Like

Have pushed a new version of email node to npm that can optionally allow manual fetch of messages (and fixes a bug of duplicate messages when connection is lost).

Haha, been a long time since I looked at doing an IMAP client - did one in PHP a decade or so back when I was contracting for NHS NPfIT and we needed to write an emergency national registration system because BT had taken a year to develop one that didn't work! Wasn't my job but it was the quickest way to get something working. For some reason the standard PHP client library didn't work properly.

I'll add it to the backlog!