• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Participant ,
Oct 07, 2019 Oct 07, 2019

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.

Views

637

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 07, 2019 Oct 07, 2019

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,

 

^ _ ^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 08, 2019 Oct 08, 2019

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,

 

^ _ ^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 08, 2019 Oct 08, 2019

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 08, 2019 Oct 08, 2019

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,

 

^ _ ^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 08, 2019 Oct 08, 2019

Copy link to clipboard

Copied

Basically we will create an account only for this purpose and the email will be CC'ed to it. So this way I will have freedom of action without affecting other users. Your suggestion triggered this path! And I appreciate it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 08, 2019 Oct 08, 2019

Copy link to clipboard

Copied

LATEST

Glad I could be of some help. I like thinking outside the box. 🙂

 

V/r,

 

^ _ ^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation