[imp] Move deleted messages to Trash folder...

Santiago Romero sromero@servicom2000.com
Tue, 12 Jun 2001 13:07:09 +0200


El mar, 12 de jun de 2001, a las 12:49:06 +0200, Santiago Romero dijo:
> El lun, 11 de jun de 2001, a las 01:45:00 -0400, Chuck Hagenbuch dijo:
> 
> > >  I would like to add a piece of code that checks if exist
> > >  a given IMAP Folder (i.e. Trash) and create it if it does
> > >  not exist... how would be that code under IMP and where
> > >  should I put it? (the problem is that users should have
> > >  Inbox, Correos_Enviados, Papelera and Mis_Correos, but they
> > >  shouldn't be able to create/manage folders, so I've removed
> > >  the link to the Folder php3 page).
> > 
> > There's a patch for a trash folder with 2.2 linked from 
> > http://horde.org/imp/2.2/.
> 
>  I've applied the patch to a clean horde/Imp distribution and
>  after it I can't move messages: moving messages or deleting
>  them do nothing, they continue on the INBOX . The Copy/Move
>  option does the same also :????

  It fails on mailbox.php3 on:

   //  print $imp->stream;
   //  print $msg_list;
   //  print $delete_to;

    if (! (imap_mail_copy($imp->stream, $msg_list,
                          $delete_to, CP_UID|CP_MOVE)) ) {
      $status_string = $lang->error($imp->label, 'deletion');
      $status_color = 'red';

    } else {
      imap_expunge($imp->stream);
    }
 

 the print above shows 22INBOX.Trash

 On the screen I get:

Warning: Cannot add more header information - the header was
 already sent (header information may be added only
before any output is generated from the script - check for
 text or whitespace outside PHP tags, or calls to functions that
output text) in ./templates/doctype.inc on line 8

 ANy idea?

-- 
Santiago Romero
Departamento de Sistemas
sromero@servicom2000.com

Av. Primado Reig 189, entlo
46020 Valencia - Spain
Telf. (+34) 96 332 12 00
Fax. (+34) 96 332 12 01
http://www.servicom2000.com