Mailing List CGatePro@mail.stalker.com Message #105942
From: Jeff Wark <jwark@tbaytel.net>
Subject: Re: Messages marked as deleted
Date: Wed, 16 Dec 2015 16:10:55 -0500
To: CommuniGate Pro Discussions <CGatePro@mail.stalker.com>
X-Mailer: CommuniGate Pro WebUser v5.3.15
Ended up writing something in Perl.

This is the lowdown:

use Mail::IMAPClient;

my $imap = connect to imap server;
my @folders = $imap->folders;
foreach $folder ( @folders ) {
  my $msgs = $imap->search( 'DELETED');
   foreach my $msg_id ( @{ $msgs } ) {
    $imap->restore_message( $msg_id );
   }
}


It actually wasn't that bad.  And when I write it that way, it seems downright trivial.    

--

Jeff Wark
Tbaytel Internet


On Wed, 16 Dec 2015 15:35:52 -0500
Jeff Wark <jwark@tbaytel.net> wrote:
>> Does anyone know of a way to 'unmark' messages as deleted?  An account has a lot of messages that have been marked as deleted
>>(probably through an IMAP client) and I would like to undo that action.
>> However, the only way I can see to clear a deleted flag is to open up the message and select 'Undelete'.  This won't work for
>>several folders with possibly hundreds of messages in each folder.
>> My goal here is to avoid writing something to do it.  ;)
>> --  
>>
>> Jeff Wark
>> Tbaytel Internet #############################################################  This message is sent to you because you are
>>subscribed to    the mailing list <CGatePro@mail.stalker.com>.  To unsubscribe, E-mail to: <CGatePro-off@mail.stalker.com>  To
>>switch to the DIGEST mode, E-mail to <CGatePro-digest@mail.stalker.com>  To switch to the INDEX mode, E-mail to
>><CGatePro-index@mail.stalker.com>  Send administrative queries to  <CGatePro-request@mail.stalker.com>

Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster