With regard to my earlier question about accessing the 'sent items' folder in Gmail, the code presented in the accepted answer downloads all the message headers in the folder, using UIDRetrieveAllEnvelopes to do so. I filter the headers once they have all been downloaded.
Is there a way of downloading only the messages which have been sent in the current day (ie filtering before downloading)?