# 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