Re: how delete a message
DINH Viet Hoa <[email protected]> Sun, 2 Apr 2006 11:27:20 +0200
| Newsgroups | gmane.mail.libetpan.user |
|---|---|
| Message-ID | <etPan.442f98f8.3e54b628.1ef1@utopia> |
????????? wrote :
> I download libetpan-0.42 and compile without errors.
> View test sample fetch-attachment, how i can delete message affter i
> sucessful get all attachment from message? (-d pop3)
> I read API and understand that i must before mailmessage_free(msg):
> - sets flag that message is deleted (don't now how)
> - call mailsession_expunge_folder(folder->fld_session) to delete all marked.
> mailmessage_get_flags(msg, &flags); // Only get's flags but how mailmessage_set_flags?
if you got the message using _get_messages_list(), then
_fetch_envelopes_list(), you don't need mailmessage_get_flags()..
Do the following :
{
mailmessage * msg
/* get the message */
msg->msg_flags->fl_flags = msg->msg_flags->fl_flags &
MAIL_FLAGS_DELETED;
mailmessage_check(msg);
/* do multiples messages flags modifications ... */
mailfolder_check(msg);
}
Note that on POP3, to use flags, you need to use the cached driver.
--
DINH V. Hoa,
"c'est un peu comme les crampons au foot au début t'as des ampoules
et après non" -- sunZ
signature.asc
(application/pgp-signature, 0 B)