Search code examples
rmicrosoft365r

list emails from specific folder with Microsoft365R's list_emails


Is there anyway to specify a folder instead of just listing the emails in the Inbox?

Example for listing items in the Inbox:

library(Microsoft365R)

outlb <- get_business_outlook()
emlst <- outlb$list_emails()

Can't find anything in the docs about how to point this to a folder.


Solution

  • Try:

    outlb <- get_business_outlook()
    emls_from_folder <- outlb$get_folder("name_of_folder")$list_emails()