# 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 =
OR(string(
section_or_field = "from", string = "allanvcq@gmail.com"),
string(
section_or_field = "from", string = "allanvcq@yahoo.com")
)
)
# searches for messages containing the string "allanvcq@gmail.com" OR
# "allanvcq@yahoo.com" in the "FROM" field.
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab