Highlighted

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

Participant ,
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

386

Likes

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

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

Participant ,
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

387

Likes

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
Oct 07, 2019 0
LEGEND ,
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,

 

^ _ ^

Likes

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
Reply
Loading...
Oct 07, 2019 0
LEGEND ,
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,

 

^ _ ^

Likes

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
Reply
Loading...
Oct 08, 2019 1
Participant ,
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.

Likes

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
Reply
Loading...
Oct 08, 2019 0
LEGEND ,
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,

 

^ _ ^

Likes

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
Reply
Loading...
Oct 08, 2019 0
Participant ,
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.

Likes

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
Reply
Loading...
Oct 08, 2019 0
LEGEND ,
Oct 08, 2019

Copy link to clipboard

Copied

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

 

V/r,

 

^ _ ^

Likes

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
Reply
Loading...
Oct 08, 2019 0