IMAP Search skipping results

Pi Digital sean at pidigital.co.uk
Fri Mar 20 10:26:47 EDT 2020


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 call is requested it fails with the response that ‘No Mailbox Selected’ so logs out again. I tried putting the setting between the two calls. Same issue. 

There are 1639 messages on the server but only 110 seem to show even with ‘UID SEARCH ALL’. 

Sean Cole


> On 20 Mar 2020, at 13:00, matthias rebbe via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> 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 (Pi) via use-livecode <use-livecode at lists.runrev.com>:
>> 
>> 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 INBOX",xHeaders,retHeaders,retResult, \
>>        retBytes,tSettings) into tStat
>>  put tsNetCustomSync("imaps://mail.myserver.co.uk", \
>>        "UID SEARCH NOT SEEN",xHeaders,retHeaders, \
>>        retResult,retBytes,tSettings) into tStat
>>  put word 3 to -1 of tStat into tUIDs
>>  put the number of words in tUIDs into sMsgCount
>>  put retHeaders &cr& tStat &cr& sMsgCount
>> 
>> My results are so inconsistent and it keeps skipping or omitting details.
>> Heres what I see:
>> 
>> 1ST RUN:::
>> * SEARCH 11646 11647 11648 11649 11650 13018 13019 13020 13021 13022 13023
>> 13024
>> 13025 13026 13027 13028 13029 13030 13031 13032 13033 13034 13035 13036
>> 13037
>> 13038 13039 13040 13041 13042 13043 13044 13045 13046 13047 13048 13049
>> 13050
>> 13051 13052 13053 13054 13055 13056 13057 13058 13059 13060 13061 13062
>> 13063
>> 13064 13065 13066 13067 13068 13069 13070 13071 13072 13073 13074 13075
>> 13076
>> 13077 13078 13079 13080 13081 13082 13083 13084 13085 13086 13087 13088
>> 13089
>> 13090 13091 13092 13093 13094 13095 13096 13097 13098 13099 13100 13101
>> 13102
>> 13103 13104 13105 13106 13107 13108 13109 13110 13111 13112 13113 13114
>> 13115
>> 13116 13117 13118 13119 13120 13121 13122 13123 13124 13125 13126 13127
>> 13128
>> 13129 13130 13131 13132 13133 13134 13135 13136 13137 13138 13139 13140
>> 13141
>> 13142 13143 13144 13145 13146 13147 13148 13149 13150 13151 13152 13153
>> 13154
>> 13155 13156 13157 13158 13159 13160 13161 13162 13163 13164 13165 13166
>> 13167
>> 13168 13169 13170 13171 13172 13173 13174 13175 13176 13177 13178 13179
>> 13180
>> 13181 13182 13183 13184 13185 13186 13187 13188 13189 13190 13191 13192
>> 13193
>> 13194
>> H160 OK Search completed (0.004 + 0.000 + 0.003 secs).
>> 
>> 2ND RUN:::
>> * SEARCH 11646 11647 11648 11649 11650 1
>> H162 OK Search completed (0.003 + 0.000 + 0.002 secs).
>> 
>> 3RD RUN:::
>> * SEARCH 11646 11647 11648 11649 11650 13170 13171 13172 13173 13174 13175
>> 13176
>> 13177 13178 13179 13180 13181 13182 13183 13184 13185 13186 13187 13188
>> 13189
>> 13190 13191 13192 13193 13194
>> H164 OK Search completed (0.003 + 0.000 + 0.002 secs).
>> 
>> 4TH RUN:::
>> * SEARCH 11646 11647 11648 11649 11650 1
>> H166 OK Search completed (0.003 + 0.000 + 0.002 secs).
>> 
>> 5TH RUN:::
>> * SEARCH 11646 11647 11648 11649 11650 1 13057 13058 13059 13060 13061
>> 13062
>> 13063 13064 13065 13066 13067 13068 13069 13070 13071 13072 13073 13074
>> 13075
>> 13076 13077 13078 13079 13080 13081 13082 13083 13084 13085 13086 13087
>> 13088
>> 13089 13090 13091 13092 13093 13094 13095 13096 13097 13098 13099 13100
>> 13101
>> 13102 13103 13104 13105 13106 13107 13108 13109 13110 13111 13112 13113
>> 13114
>> 13115 13116 13117 13118 13119 13120 13121 13122 13123 13124 13125 13126
>> 13127
>> 13128 13129 13130 13131 13132 13133 13134 13135 13136 13137 13138 13139
>> 13140
>> 13141 13142 13143 13144 13145 13146 13147 13148 13149 13150 13151 13152
>> 13153
>> 13154 13155 13156 13157 13158 13159 13160 13161 13162 13163 13164 13165
>> 13166
>> 13167 13168 13169 13170 13171 13172 13173 13174 13175 13176 13177 13178
>> 13179
>> 13180 13181 13182 13183 13184 13185 13186 13187 13188 13189 13190 13191
>> 13192
>> 13193 13194
>> H170 OK Search completed (0.003 + 0.000 + 0.002 secs).
>> 
>> What setting am I missing to make sure it is always consistent? Or is this
>> a bug with TSNet?
>> 
>> I can't think of any workarounds for this one. And it is so key to the
>> whole app.
>> 
>> Sean Cole
>> *Pi Digital*
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list