Setting message flags

Top  Previous  Next

You can set the flags for one or more messages using the Imap#store methods.

 

Flags

 

Flag

Description

\Seen

The message has been read.

\Answered

The message has been replied to.

\Flagged

The message is flagged for attention.

\Deleted

The message has been marked for deletion.  Message will not be deleted until the Imap#expunge method is invoked.

\Draft

The message is a draft message.

\Recent

The current session is the first session to have been presented with this message.

 

Example

 

// add \Answered flag to messages 1 thru 10 to existing flags

imap.store(1,10,Imap.FLAG_MODE_ADD,Imap.FLAG_ANSWERED);

 

Example

 

// overwrite all flags with \Answered flag on messages 1 thru 10

imap.store(1,10,Imap.FLAG_MODE_REPLACE,Imap.FLAG_ANSWERED);

 

Example

 

// remove \Answered flag to messages 1 thru 10 to existing flags

imap.store(1,10,Imap.FLAG_MODE_DELETE,Imap.FLAG_ANSWERED);

 

 

 





Home | Company | Products | Solutions | Purchase | Support | Services | Blog

© 2021 JSCAPE LLC