# NOT RUN {
# }
# NOT RUN {
# configure IMAP
library(mRpostman)
imapconf <- configure_imap(url="imaps://your.imap.server.com",
username="your_username",
password=rstudioapi::askForPassword()
)
# deleting based on search results
result1 <- imapconf %>%
select_mailbox(mbox = "TAM") %>%
search_before(date_char = "10-may-2012", by = "UID") %$% #modified pipe operator - pass two argg
delete_msg(imapconf = imapconf, msg_id = msg_id)
# deleting a specific msg_id without a previous search
result2 <- imapconf %>%
select_mailbox(mbox = "INBOX") %>%
delete_msg(msg_id = 66128)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab