# NOT RUN {
# }
# NOT RUN {
# configure IMAP
library(mRpostman)
imapconf <- configure_imap(url="imaps://your.imap.server.com",
username="your_username",
password=rstudioapi::askForPassword()
)
# deleting a message using specific UID
result1 <- imapconf %>%
select_mailbox(mbox = "TAM") %>%
delete_msg(msg_id = 71171, by = "UID") %$%
expunge(imapconf = imapconf, specific_UID = msg_id)
# expunge all message smarked as "DELETED" in INBOX
result2 <- imapconf %>%
select_mailbox(mbox = "INBOX") %>%
expunge()
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab