Learn R Programming

mRpostman (version 0.3.1)

examine_mailbox: Examine Mailbox

Description

Retrieve the number of recent messages and the total number of messages in a mailbox.

Usage

examine_mailbox(imapconf, retries = 2)

Arguments

imapconf

An object of class imapconf generated with configure_imap and with a mbox item added after a mailbox selection with select_mailbox

retries

Number of attempts to connect and execute the command. Default is 2.

Value

A vector containing the ("EXISTS") and the ("RECENT") number of messages in the selected mailbox.

See Also

Other mailbox commands: list_mailboxes, list_server_capabilities, rename_mailbox, select_mailbox

Examples

Run this code
# NOT RUN {
# configure IMAP
library(mRpostman)
imapconf <- configure_imap(url="imaps://your.imap.server.com",
                           username="your_username",
                           password=rstudioapi::askForPassword()
                          )

# list mailboxes
results <- imapconf %>%
  list_mailboxes() %>%
  select_mailbox(mbox = "Sent") %>%
  examine_mailbox()

# }

Run the code above in your browser using DataLab