search_emails: Search for emails

Description Usage Arguments Details

Description

Searches for all emails satisfying a search term. Searches can be performed in one of several email attributes, such as subject or sender name. Searches are always case sensitive. The DCOM search method used is asynchronous, in that R will not wait for the search to complete before continuing. We pause R for a given amount of time (default is 10 seconds) to allow the search to complete. See Details for more information.

Usage

1
2
search_emails(search_term, folder = "Inbox", scope = "subject",
  partial_match = TRUE, search_subfolders = TRUE, search_time = 10)

Arguments

search_term

A case-sensitive search query.

folder

A folder in which to search. Defaults to "Inbox".

scope

The scope of the search: one of "subject", "body", "attachment_names", "from_name", "from_email", "cc_name", or "to_name".

partial_match

If set to TRUE, will allow any number of characters to appear either side of the search term. Defaults to TRUE.

search_subfolders

If set to TRUE, will search subfolders below the specified 'folder'. Defaults to TRUE.

search_time

The amount of time, in seconds, to wait for the search to complete.

Details

There is a package for handling the AdvancedSearchComplete, RDCOMEvents, but it is not easily available. The proper way to implement this search would be to wait for the event to return that the search is complete, and then continue.


mdneuzerling/RDCOMOutlook documentation built on May 21, 2019, 12:21 p.m.