[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-mailutils] rename mailbox
From: |
Stephen Bylo |
Subject: |
[bug-mailutils] rename mailbox |
Date: |
05 Dec 2003 13:28:09 +0800 |
Hi,
Is this below the only way to "rename" a mailbox ?
Why is there no mailbox_rename() like there is folder_rename() ?
Thanxs
Steve
Code taken from imap4d/rename.c:
if ( mailbox_create_default ( &inbox, auth_data->name ) == 0 &&
mailbox_open ( inbox, MU_STREAM_RDWR ) == 0 )
{
size_t no;
size_t total = 0;
mailbox_messages_count ( inbox, &total );
for ( no = 1; no <= total; no++ )
{
message_t message;
if ( mailbox_get_message ( inbox, no, &message ) == 0 )
{
attribute_t attr = NULL;
mailbox_append_message ( newmbox, message );
message_get_attribute ( message, &attr );
attribute_set_deleted ( attr );
}
}
mailbox_expunge ( inbox );
mailbox_close ( inbox );
mailbox_destroy ( &inbox );
}
mailbox_close ( newmbox );
mailbox_destroy ( &newmbox );
return util_finish ( command, RESP_OK, "Already exist" );
- [bug-mailutils] rename mailbox,
Stephen Bylo <=