After a bit of digging in the AppEngine source and Python's imaplib and 
socket library, it seems by default sockets have no timeouts. So it's weird 
that my requests are timing out at exactly 60 seconds. 

Regarding the X-GM-THRID command, how would I generate the GM-THRID from a 
message UID or RFC822 ID? (I don't have the GM-THRID at hand, and it's not 
possible for me to get it from the browser url and DOM)

Thanks,
John

On Friday, October 25, 2013 5:21:42 AM UTC+8, Vinny P wrote:
>
>
> On Thu, Oct 24, 2013 at 10:03 AM, John Del Rosario 
> <[email protected]<javascript:>
> > wrote:
>
>> I'm doing a SEARCH  with "HEADER In-Reply-To <rfc822_msg_id>" to get a 
>> message's replies. I'm not sure how to verify it, but I'm guessing maybe 
>> it's happening for emails that have a *lot* of replies already? It's 
>> only happening on a couple of emails. 
>>
>> Would you know if it's possible to only get 1 message from the SEARCH? I 
>> only need one. And I don't need the messages' bodies either. So if it's 
>> possible to limit the response, maybe that will help with the issue.
>>
>
>
>
> I don't believe IMAP supports limiting search results by the number of 
> results. You would have to limit by another criteria, such as SENTSINCE 
> (emails sent after a certain date), subject, etc.
>
> What you can do instead is use Gmail's IMAP extensions. Gmail IMAP offers 
> the X-GM-THRID command ( 
> https://developers.google.com/gmail/imap_extensions#access_to_the_gmail_thread_id_x-gm-thrid
>  ) 
> which you can use to retrieve whole threads (original email, plus replies). 
> And imaplib allows the usage of IMAP extensions via xatom ( 
> http://docs.python.org/2/library/imaplib.html#imaplib.IMAP4.xatom ). 
> Unfortunately you may have to do some parsing of the results, but it 
> shouldn't be too bad.
>
>
>
> On Thu, Oct 24, 2013 at 10:03 AM, John Del Rosario 
> <[email protected]<javascript:>
> > wrote:
>
>> Also, would doing multiple requests to the same IMAP server 
>> simultaneously have any undesirable results?
>>
>
>
>
> Unlikely, since current mail clients also frequently open up multiple 
> connections to mail servers.
> Note that Gmail allows a maximum of 15 simultaneous connections, so don't 
> open too many (note https://support.google.com/mail/answer/97150?hl=en ).
>  
>
>   
> -----------------
> -Vinny P
> Technology & Media Advisor
> Chicago, IL
>
> App Engine Code Samples: http://www.learntogoogleit.com
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to