# NOT RUN {
# }
# NOT RUN {
# configure IMAP
library(mRpostman)
imapconf <- configure_imap(url="imaps://your.imap.server.com",
username="your_username",
password=rstudioapi::askForPassword()
)
# search 1
result1 <- imapconf %>%
select_mailbox(mbox = "[Gmail]/Sent") %>%
search_before(date_char = "17-Apr-2012")
# search 2 (brazilian portuguese example -- mailboxes with compound names)
result2 <- imapconf %>%
select_mailbox(mbox = "[Gmail]/Com estrela") %>%
search_before(date_char = "17-Dec-2018", flag = "ANSWERED")
# depending on results, it might be necessary to increase buffersize in
# configure_imap()
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab