Re: IMAP Search skipping results

2020-03-23 Thread Mark Waddingham via use-livecode
On 2020-03-23 18:02, Bob Sneidar via use-livecode wrote: Ahh hah hah! That’s funny. I can’t even write a snippet without debugging it! :-) Debugging is just a means to discover the assumptions you made which were invalid! ;) Warmest Regards, Mark. -- Mark Waddingham ~ m...@livecode.com ~

Re: IMAP Search skipping results

2020-03-23 Thread Bob Sneidar via use-livecode
Ahh hah hah! That’s funny. I can’t even write a snippet without debugging it! :-) Bob S > On Mar 23, 2020, at 11:01 AM, Mark Waddingham via use-livecode > wrote: > > On 2020-03-23 17:49, Pi Digital via use-livecode wrote: >> Hey, are you insinuating my code is flawed!?! :-o >> The cheek of

Re: IMAP Search skipping results

2020-03-23 Thread Mark Waddingham via use-livecode
On 2020-03-23 17:49, Pi Digital via use-livecode wrote: Hey, are you insinuating my code is flawed!?! :-o The cheek of it! ;) Lol - well we all write flawed code from time to time... More often though we write code which is perfect but based on assumptions we didn't realize could be invalid

Re: IMAP Search skipping results

2020-03-23 Thread Pi Digital via use-livecode
Hey, are you insinuating my code is flawed!?! :-o The cheek of it! ;) Sean Cole Pi Digital . > > I'd perhaps suggest that something isn't a workaround if the original > approach was flawed (however irksome the more code it requires might be!) ;) > > Warmest Regards, > > Mark. > > -- >

Re: IMAP Search skipping results

2020-03-23 Thread Mark Waddingham via use-livecode
On 2020-03-23 17:14, Pi Digital via use-livecode wrote: Finding the first unseen UID though seems to be the next issue I’m going to have to overcome. A never ending stream of workarounds. Well, unfortunately, this is a bug in cURL as far as we can see - its been there for 6 years and no-one

Re: IMAP Search skipping results

2020-03-23 Thread Pi Digital via use-livecode
Thanks Brian and Mark A combination may well help. I am not for this project needing ALL but have been using UNSEEN. The mailboxes we are referencing have around 100-1200 emails coming in from O2 every morning at 4am. These then get processed at 5am to update their databases. I will have to

Re: IMAP Search skipping results

2020-03-23 Thread Mark Waddingham via use-livecode
On 2020-03-23 15:21, Pi Digital via use-livecode wrote: Thanks Mark, your input here is appreciated. This reply in that forum wasn’t helpful, was it > Known bug #90 was reported in 2014. However it still occurs in 2019. Does > anybody know how to overcome this situation? Yes: by fixing the

Re: IMAP Search skipping results

2020-03-23 Thread Brian Milby via use-livecode
Does ‘STATUS INBOX (UNSEEN)’ give the proper count reliably?  (Would actually need to use MESSAGES though to page through the whole inbox, but you could stop paging once all we’re found.) If so, ranges are just specified with a : so you could use the sequence numbers to get the UIDs (1:100 then

Re: IMAP Search skipping results

2020-03-23 Thread Pi Digital via use-livecode
Thanks Mark, your input here is appreciated. This reply in that forum wasn’t helpful, was it > > > Known bug #90 was reported in 2014. However it still occurs in 2019. Does > > anybody know how to overcome this situation? > > Yes: by fixing the code! > In the thread it talks of pagination

Re: IMAP Search skipping results

2020-03-23 Thread Mark Waddingham via use-livecode
On 2020-03-23 11:39, Pi Digital via use-livecode wrote: No, same thing unfortunately. Even ALL has the issue. According to an old bug report that has sat for an age untouched it is a known issue in the ood curl lib they are using. At the rate they are currently dealing with bugs for fundamental

Re: IMAP Search skipping results

2020-03-23 Thread Pi Digital via use-livecode
No, same thing unfortunately. Even ALL has the issue. According to an old bug report that has sat for an age untouched it is a known issue in the ood curl lib they are using. At the rate they are currently dealing with bugs for fundamental operations we might see a fix in about a year or two

Re: IMAP Search skipping results

2020-03-23 Thread Charles Warwick via use-livecode
Hi Sean, For your particular issue, does using “SEARCH UNSEEN” instead of “UID SEARCH NOT SEEN” provide the results you are looking for? Regards, Charles > On 21 Mar 2020, at 3:10 am, Pi Digital via use-livecode > wrote: > > Thanks Bob > > Yeah, I actually already have something like

Re: IMAP Search skipping results

2020-03-20 Thread Pi Digital via use-livecode
Thanks Bob Yeah, I actually already have something like that. I’d abbreviated my code to keep it simple on the forum. I’m not having trouble connecting. It’s just the shortage of data returned from the server. It’s actually skipping a whole chunk in the middle which is the weirdest part.

Re: IMAP Search skipping results

2020-03-20 Thread Bob Sneidar via use-livecode
This version wraps ALL the tsNet calls in a try catch construct: function IMAPGetHeaders pServer, pUser, pPass if pServer is empty then ask "Enter IMAP Server IP or address:" as sheet if the result is "Cancel" then return "Canceled." put it into pServer end if if

Re: IMAP Search skipping results

2020-03-20 Thread Bob Sneidar via use-livecode
This may be of more use. No functional changes, just something you can use to test against different IMAP servers: function IMAPGetHeaders pServer, pUser, pPass if pServer is empty then ask "Enter IMAP Server IP or address:" as sheet if the result is "Cancel" then return

Re: IMAP Search skipping results

2020-03-20 Thread Pi Digital via use-livecode
Thanks Matthias I will give it a go. I tried some of the other settings but not that one as it happens. Does that not upset the fact that you have set the inbox and also download each message body one at a time? That’s why I didn’t try it. In fact, just gave it a go but by the time the second

Re: IMAP Search skipping results

2020-03-20 Thread matthias rebbe via use-livecode
Hi Sean, just a guess. Did you already try to set the NO_REUSE element in the tSettings array to TRUE? I am using that setting always, because the default one caused very often problems here. - Matthias Rebbe Life Is Too Short For Boring Code > Am 20.03.2020 um 03:16 schrieb Sean Cole

IMAP Search skipping results

2020-03-19 Thread Sean Cole (Pi) via use-livecode
Hey all, I'm using TSNet lib to fetch email from IMAP. The Script: put "MyName" into tSettings["username"] put "MyPass" into tSettings["password"] put empty into xHeaders tsnetinit put tsNetCustomSync("imaps://mail.myserver.co.uk", \ "SELECT