Learn R Programming

mRpostman (version 0.3.1)

AND: Relational Operators - Helper Functions for Custom Search

Description

Allows a combination of criteria helper functions such as such as before, since, on, sent_before, sent_since, sent_on, flag, string, smaller_than, larger_than, younger_than, or younger_than, in order to execute a multiple criteria custom search.

Usage

AND(..., negate = FALSE)

Arguments

...

a combination of criteria helper functions with its arguments.

negate

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

Value

A search string to be used as a custom_request parameter in custom_search function.

See Also

Other customsearch helper functions: OR, before, flag, larger_than, older_than, on, sent_before, sent_on, sent_since, since, smaller_than, string, younger_than

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
# configure IMAP
library(mRpostman)
imapconf <- configure_imap(url="imaps://your.imap.server.com",
                           username="your_username",
                           password=rstudioapi::askForPassword()
                          )

# search
result <- imapconf %>%
    select_mailbox(mbox = "INBOX") %>%
    custom_search(custom_request = AND(sent_since(date.char = "17-Apr-2019"),
                                       smaller_than(size = 512000),
                                       negate = TRUE))
# searches for messages NOT SentSince "17-Apr-2019" AND NOT Smaller Than 512KB.

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab