On Wed, 3 Sep 2008, Shawn Walker wrote:

Hrmm, how would I tell the SEARCHPGM to use "NOT DELETED" or "DELETED"? Is there a sample code that I can look at?

Something like this should find all the deleted messages. Change to pgm->undeleted for NOT DELETED messages. I haven't tried this actual code.

Steve

 SEARCHPGM *pgm;
 MESSAGECACHE *mc;
 unsigned long msgno, uid;

 pgm = mail_newsearchpgm();

 pgm->deleted = 1;

 mail_search_full(stream, charset, pgm, SE_UID | SE_FREE);

 for(msgno= 1L; msgno < stream->nmsgs; msgno++)
   if(stream && (mc=mail_elt(stream,msgno)) && mc->searched){
     /* msgno is marked deleted */

     /* it's uid is */
     uid = mail_uid(stream, msgno);
   }


_______________________________________________
Imap-uw mailing list
[email protected]
http://mailman2.u.washington.edu/mailman/listinfo/imap-uw

Reply via email to