The Flags resource allows you set to retrieve and set flags that indicate, among others, if the message has been read.
You can find detailed explanation about each IMAP message flags here: http://tools.ietf.org/html/rfc3501#section-2.3.2.
message_id or email_message_id property of the message. The gmail_message_id (prefixed with gm-) can also be used.To ensure up-to-date values, flags are not cached by Context.IO. This call triggers a connection to the IMAP server to fetch the current message flags before it returns.
{
"seen": booleanwhether or not a message has been viewed,
"answered": booleanwhether or not a message has been replied to,
"flagged": booleanwhether or not a message has been flagged,
"deleted": booleanwhether or not a message has been deleted,
"draft": booleanwhether or not a message is in draft mode,
"nonjunk": booleanwhether or not a message has been flagged as "junk" mail,
}
If you want to fetch headers, body and flags for a given message, you can use the related include_* GET parameters on the message instance to get them all in a single call.
message_id or email_message_id property of the message. The gmail_message_id (prefixed with gm-) can also be used.| name | type | description |
|---|---|---|
| optional: | ||
| seen | integer | Message has been read. Set this parameter to 1 to set the flag, 0 to unset it. |
| answered | integer | Message has been answered. Set this parameter to 1 to set the flag, 0 to unset it. |
| flagged | integer | Message is "flagged" for urgent/special attention. Set this parameter to 1 to set the flag, 0 to unset it. |
| deleted | integer | Message is "deleted" for later removal. An alternative way of deleting messages is to move it to the Trash folder. Set this parameter to 1 to set the flag, 0 to unset it. |
| draft | integer | Message has not completed composition (marked as a draft). Set this parameter to 1 to set the flag, 0 to unset it. |
{
"success": booleanwhether or not a flag was succesfully set,
"flags": objectNew state of all IMAP flags, see GET above for details
}