PHP Classes

message flags

Recommend this page to a friend!

      IMAP  >  All threads  >  message flags  >  (Un) Subscribe thread alerts  
Subject:message flags
Summary:How do i retrieve message flags into variables?
Author:Edgardo Daniel
Date:2005-12-22 17:25:20
Update:2012-03-30 08:09:42

  1. message flags   Reply   Report abuse  
Picture of Edgardo Daniel Edgardo Daniel - 2005-12-22 17:25:20
Very useful class! Now, a question. What can I do to know if a certain email message is flagged as, for example, deleted ?
Should I use $imap->fetch_mail("$UID","FLAGS") and then parse the output, looking for \\Deleted ?
Is there anything like imap_fetch_overview() from PHP IMAP extension, that is capable of returning a flag value in an array -not a string- ?

Thank you very much.

  2. Re: message flags   Reply   Report abuse  
Picture of Harish Chauhan Harish Chauhan - 2005-12-23 06:14:46 - In reply to message 1 from Edgardo Daniel
You can use search_mailbox() or uid_search_mailbox() for searching the flagged mails like deleted.

You can use search_mailbox("DELETED SINCE 1-Feb-1994 NOT FROM \"Smith\"")

You also use the fetch_mail( 2:4 (FLAGS BODY[HEADER.FIELDS (DATE FROM)])

  3. Re: message flags   Reply   Report abuse  
Picture of Anders Jenbo Anders Jenbo - 2012-03-30 08:09:43 - In reply to message 2 from Harish Chauhan
My rewrite of this class returns flags in an array, if you need it it can be found here: