Copy link to clipboard
Copied
Hello community. I have to run a script to retrieve emails from an IMAP account.
Everything is working as expected using the CFIMAP tag.
However, since emails are not regularly deleted from this account, it is taking very long.
Is there a way to limit my "getall" action to unseen emails only?
Thank you in advance.
Copy link to clipboard
Copied
I've never used CFIMAP, so don't really know. But looking at the help docs, there is a markRead. Have you tried using the markRead action to see if on the next connection it will get only the read ones? Or does getAll get all messages, regardless of read status?
V/r,
^ _ ^
Copy link to clipboard
Copied
Hi, Dani,
One thought. If getting only unread emails isn't possible (I don't know either way), create a folder under the inbox to which you can move the emails once they've been downloaded. The default for recursive is false, so that folder won't be searched upon future accessing. Just a thought.
V/r,
^ _ ^
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Och.. well, if other people are accessing it, then it isn't the _best_ idea. Unless they are okay with having to go into that other folder, of course. 🙂
V/r,
^ _ ^
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Glad I could be of some help. I like thinking outside the box. 🙂
V/r,
^ _ ^