sent_since: Criterion constructor function to be combined in a custom...

View source: R/sent-since.R

sent_sinceR Documentation

Criterion constructor function to be combined in a custom search statement

Description

Criterion constructor function to be combined in a custom search statement

Usage

sent_since(date_char, negate = FALSE)

Arguments

date_char

A character string with format "DD-Mon-YYYY", e.g. "01-Apr-2019". We opt not to use Date or POSIX* like objects, since IMAP servers use this unusual date format.

negate

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

Value

A search string to be used as a request parameter in ImapCon$search() function.

See Also

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

Examples

## Not run: 
# select folder & search
con$select_folder(name = "INBOX")
# search for messages SENT SINCE "22-Mar-2020" OR containing the STRING
#  "congratulations" in the subject.
res <- con$search(request = AND(sent_since(date_char = "22-Mar-2020"),
                                string(expr = "congratulations",
                                       where = "SUBJECT")))

## End(Not run)

mRpostman documentation built on Oct. 29, 2022, 1:16 a.m.