Re: Message Flags Storage for IMAP

DINH Viet Hoa <[email protected]>
Newsgroups gmane.mail.libetpan.user
Message-ID <etPan.40cf0adb.75a3732b.6110@homer>
Jason Beard wrote :

> Thanks,
> 
> Could you give me some sample code on how to set the message flags for a 
> particular message before calling mailsession_check()?

void mark_as_read(mailmessage * msg)
{
  msg->msg_flags->fl_flags |= MAIL_FLAG_SEEN;
  
  mailmessage_check(msg);
}

int main(void)
{
  ...
  /* mark all the message as read, using mark_as_read() */
  ... 

  mailsession_check(folder->fld_session);

  exit(EXIT_SUCCESS);
}

 or 

{
  ...
  /* mark all the message as read */

  mailfolder_disconnect(folder);

  /* if you don't need the folder more */
}

-- 
DINH V. Hoa,

"l'informatique est une source inépisable de calembours divers" -- 7th
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQBAzwwT7w+pfAWHa3MRAoWrAJ9Dz0su7IDNPjwTNloiSAXcBcxa+gCfR2oN
9EgwUZoJi8xHzRf2AE8ph7c=
=DmUB
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.