Criterion constructor function to be combined in a custom search statement
since(date_char, negate = FALSE)
A character string
with format "DD-Mon-YYYY", e.g.
"01-Apr-2019". We opted for not to use Date
or POSIX*
like
objects, since IMAP servers use this unusual date format.
If TRUE
, negates the search and seeks for "NOT SEARCH
CRITERIA". Default is FALSE
.
A search string to be used as a request
parameter in
ImapCon$search()
function.
Other custom search:
AND()
,
ImapCon
,
OR()
,
before()
,
flag()
,
larger_than()
,
older_than()
,
on()
,
sent_before()
,
sent_on()
,
sent_since()
,
smaller_than()
,
string()
,
younger_than()
# NOT RUN {
# select folder & search
con$select_folder(name = "INBOX")
# search for messages SINCE "17-Apr-2019" AND SMALLER than 512KB.
res <- con$search(request = AND(since(date_char = "17-Apr-2019"),
smaller_than(size = 512000)))
# }
Run the code above in your browser using DataLab