Criterion constructor function to be combined in a custom search statement

flag(name, negate = FALSE)

Arguments

name

A string containing one or more flags to search for. Use ImapCon$list_flags() to list the flags in a selected mail folder.

negate

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

See also

Other custom search: AND(), ImapCon, OR(), before(), larger_than(), older_than(), on(), sent_before(), sent_on(), sent_since(), since(), smaller_than(), string(), younger_than()

Examples

if (FALSE) {
# select folder & search
con$select_folder(name = "INBOX")
# search for messages with Flag "UNSEEN" AND NOT Smaller Than  512KB.
res <- con$search(request = AND(flag("UNSEEN"),
                                smaller_than(size = 512000, negate = TRUE)))
}