Skip to main content
Dani Szwarc
Inspiring
October 7, 2019
Question

CFIMAP - Action="GetAll": read only unseen messages

  • October 7, 2019
  • 2 replies
  • 817 views

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.

    This topic has been closed for replies.

    2 replies

    WolfShade
    Legend
    October 8, 2019

    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,

     

    ^ _ ^

    Dani Szwarc
    Inspiring
    October 8, 2019
    Hey Wolf, that's a very clever idea! Thank you very much. Will check with the account admin if doing this is an option for them as my understanding is that real people access this account besides the script I am building.
    WolfShade
    Legend
    October 8, 2019

    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,

     

    ^ _ ^

    WolfShade
    Legend
    October 7, 2019

    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,

     

    ^ _ ^