Builds the MODSEQ search key, which matches the messages whose modification sequence is equal to or greater than value, i.e. the messages that were added or whose flags changed since the folder had that HIGHESTMODSEQ (obtained with ImapCon$status(items = "HIGHESTMODSEQ")). It is to be combined with AND and OR and passed to ImapCon$search(). The server must advertise the CONDSTORE capability.

modseq(value, negate = FALSE)

Arguments

value

A single non-negative number, the modification sequence to compare with.

negate

If TRUE, negates the search and seeks for "NOT SEARCH CRITERIA". Default is FALSE.

Value

A character string with the search criterion.

Examples

if (FALSE) { # \dontrun{
con$select_folder(name = "INBOX")
last <- con$status(items = "HIGHESTMODSEQ")[["HIGHESTMODSEQ"]]
# ... later, in another run:
changed <- con$search(request = modseq(last + 1))
} # }