diff --git a/_pkgdown.yml b/_pkgdown.yml index d71acfb..cf207f8 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,4 +1,2 @@ url: ~ -template: - bootstrap: 5 diff --git a/docs/articles/basics.html b/docs/articles/basics.html index b8698c7..6cba432 100644 --- a/docs/articles/basics.html +++ b/docs/articles/basics.html @@ -4,8 +4,7 @@ - - + mRpostman basics • mRpostman @@ -13,11 +12,12 @@ - - - + + + - + + - - Skip to contents - - -
- - + +
+ + -
-
+
+ -
- diff --git a/docs/articles/code_migration.html b/docs/articles/code_migration.html index 240880b..5620ee5 100644 --- a/docs/articles/code_migration.html +++ b/docs/articles/code_migration.html @@ -4,8 +4,7 @@ - - + Migrating old code to the new mRpostman's syntax • mRpostman @@ -13,11 +12,12 @@ - - - + + + - + + - - Skip to contents - - -
- - + +
+ + -
-
+
- diff --git a/docs/articles/index.html b/docs/articles/index.html index 9ce08a5..5a4c26d 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -1,83 +1,177 @@ + -Articles • mRpostman - Skip to contents - + + + + + + +Articles • mRpostman + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
+
+
mRpostman basics
+
+
Migrating old code to the new mRpostman's syntax
+
+
IMAP OAuth2.0 authentication in mRpostman
+
+
+
+ + -
+
+ - - + + + diff --git a/docs/articles/xoauth2.0.html b/docs/articles/xoauth2.0.html index 0f25f4b..951df74 100644 --- a/docs/articles/xoauth2.0.html +++ b/docs/articles/xoauth2.0.html @@ -4,8 +4,7 @@ - - + IMAP OAuth2.0 authentication in mRpostman • mRpostman @@ -13,11 +12,12 @@ - - - + + + - + + - - Skip to contents - - -
- - + +
+ + -
-
+
+ + + -
- diff --git a/docs/authors.html b/docs/authors.html index 24773b1..5c9bceb 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -1,98 +1,173 @@ + -Authors and Citation • mRpostman - Skip to contents - + + + + + + +Authors • mRpostman + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
-
+
    +
  • +

    Allan Quadros. Author, maintainer. +

    +
  • +
+ +
+ + + -
+
+ - - + + + diff --git a/docs/index.html b/docs/index.html index 3e877ef..532e58e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,10 +4,7 @@ - - + An IMAP Client for R • mRpostman @@ -15,11 +12,12 @@ - - - + + + - + + @@ -29,61 +27,80 @@ - - Skip to contents - - -
-
-
- + + + + +
+
+
+ @@ -91,146 +108,203 @@

An IMAP Client for R

-
-

Overview -

-

mRpostman is an easy-to-use IMAP client that provides tools for message searching, selective fetching of message attributes, mailbox management, attachment extraction, and several other IMAP features. The aim of this package is to pave the way for email data analysis in R. To do so, mRpostman makes extensive use of the {curl} package and the libcurl C library.

-

mRpostman’s official website: https://allanvc.github.io/mRpostman/

+
+

+Overview

+

mRpostman is an easy-to-use IMAP client that provides +tools for message searching, selective fetching of message attributes, +mailbox management, attachment extraction, and several other IMAP +features. The aim of this package is to pave the way for email data +analysis in R. To do so, mRpostman makes extensive use of +the {curl} package and the libcurl C library.

+

mRpostman’s official website: https://allanvc.github.io/mRpostman/

IMPORTANT:

-
    -
  1. In version 0.9.0.0, mRpostman went trough substantial changes, including ones that have no backward compatibility with versions <= 0.3.1. A detailed vignette on how to migrate your mRpostman’s deprecated code to the new syntax is available at “Migrating old code to the new mRpostman’s syntax”.

  2. -
  3. Old versions of the libcurl C library ({curl}’s main engine) will cause the malfunction of this package. If your libcurl’s version is above 7.58.0, you should be fine. In case you intend to use OAuth 2.0 authentication, then you will need libcurl >= 7.65.0. To learn more about the OAuth 2.0 authentication in this package, refer to the “Using IMAP OAuth2.0 authentication in mRpostman” vignette.

  4. +
      +
    1. In version 0.9.0.0, mRpostman went +trough substantial changes, including ones that have no backward +compatibility with versions <= 0.3.1. A detailed +vignette on how to migrate your mRpostman’s deprecated code to the new +syntax is available at “Migrating +old code to the new mRpostman’s syntax”.

    2. +
    3. Old versions of the libcurl C library ({curl}’s main engine) will +cause the malfunction of this package. If your libcurl’s version is +above 7.58.0, you should be fine. In case you intend to use OAuth 2.0 +authentication, then you will need libcurl >= 7.65.0. To learn more +about the OAuth 2.0 authentication in this package, refer to the “Using +IMAP OAuth2.0 authentication in mRpostman” vignette.

-
-

Authentication -

-

There are two ways of connecting to your IMAP server: using plain or OAuth2.0 authentication. Here, we only describe the plain authentication process. If you want to use OAuth2.0 authentication, please read the aforementioned vignette.

-
-

Allowing less secure apps access -

-

When using plain authentication, most of the mail providers will require the user to enable less secure apps access. Once it is done, you will be able to access your mailbox using a “third party app” as mRpostman.

-
-
-

Plain authentication -

-

Before using mRpostman, it is essential to configure the access to your email account. Various mail providers require that you enable “less secure apps” access to accept plain authentication between the IMAP server and a third-party app.

-

Let’s see how to configure simple plain authentication for Gmail, Yahoo Mail, AOL Mail, Hotmail, and Office 365.

-
-

Outlook - Office 365 -

-

There is no need to execute any external configuration. Please, note that the url parameter in configure_imap() should be set as url = "imaps://outlook.office365.com", and the username should be set as user@yourcompany.com.

-
-
-

Hotmail -

-

There is no need to execute any external configuration. Please, note that the url parameter in configure_imap() should be set as url = "imaps://imap-mail.outlook.com", and the username should be set as user@hotmail.com.

-
-
-

Gmail -

-
    -
  1. Go to the Gmail website and log in with your credentials.

  2. -
  3. Then, go to https://myaccount.google.com/u/1/lesssecureapps?pageId=none

  4. -
+
+

+Authentication

+

There are two ways of connecting to your IMAP server: using plain or +OAuth2.0 authentication. Here, we only describe the plain authentication +process. If you want to use OAuth2.0 authentication, please read the +aforementioned vignette.

+
+

+Allowing less secure apps access

+

When using plain authentication, most of the mail providers will +require the user to enable less secure apps access. +Once it is done, you will be able to access your mailbox using a “third +party app” as mRpostman.

+
+
+

+Plain authentication

+

Before using mRpostman, it is essential to configure the +access to your email account. Various mail providers require that you +enable “less secure apps” access to accept plain +authentication between the IMAP server and a third-party app.

+

Let’s see how to configure simple plain authentication for Gmail, +Yahoo Mail, AOL Mail, Hotmail, and Office 365.

+
+

+Outlook - Office 365

+

There is no need to execute any external configuration. Please, note +that the url parameter in configure_imap() +should be set as url = "imaps://outlook.office365.com", and +the username should be set as +user@yourcompany.com.

+
+
+

+Hotmail

+

There is no need to execute any external configuration. Please, note +that the url parameter in configure_imap() +should be set as url = "imaps://imap-mail.outlook.com", and +the username should be set as +user@hotmail.com.

+
+
+

+Gmail

+

1) Go to the Gmail website and log in with your credentials.

+

2) Then, go to https://myaccount.google.com/u/1/lesssecureapps?pageId=none

-
    -
  1. Set “Allow less secure apps” to ON.
  2. -
+

3) Set “Allow less secure apps” to ON.

-
-

Yahoo Mail -

-
    -
  1. Go to the Yahoo Mail website and log in with your credentials.

  2. -
  3. Click on “Account Info”.

  4. -
+
+

+Yahoo Mail

+

1) Go to the Yahoo Mail website and log in with your credentials.

+

2) Click on “Account Info”.

-
    -
  1. Click on “Account Security” on the left menu.
  2. -
+

3) Click on “Account Security” on the left menu.

-
    -
  1. Then, set “Allow apps that use less secure sign in” ON -
  2. -
+

4) Then, set “Allow apps that use less secure sign in” +ON

-
-

AOL Mail -

-
    -
  1. Go to the AOL Mail website and log in with your credentials.

  2. -
  3. Click on “Options” and then on “Account Info”.

  4. -
+
+

+AOL Mail

+

1) Go to the AOL Mail website and log in with your credentials.

+

2) Click on “Options” and then on “Account Info”.

-
    -
  1. Click on “Account Security” on the left menu.
  2. -
+

3) Click on “Account Security” on the left menu.

-
    -
  1. After, set “Allow apps that use less secure sign in” ON -
  2. -
+

4) After, set “Allow apps that use less secure sign in” +ON

-
-

Introduction -

-

From version 0.9.0.0 onward, mRpostman is implemented under the OO paradigm, based on an R6 class called ImapCon. Its derived methods, and a few independent functions enable the R user to perform a myriad of IMAP commands.

-

The package is divided in 8 groups of operations. Below, we present all the available methods and functions:

+
+

+Introduction

+

From version 0.9.0.0 onward, mRpostman is implemented +under the OO paradigm, based on an R6 class called ImapCon. +Its derived methods, and a few independent functions enable the R user +to perform a myriad of IMAP commands.

+

The package is divided in 8 groups of operations. Below, we present +all the available methods and functions:

  • -configuration methods: configure_imap(), reset_url(), reset_username(), reset_password(), reset_verbose(), reset_use_ssl(), reset_buffersize(), reset_timeout_ms(), reset_xoauth2_bearer();
  • +configuration methods: +configure_imap(), reset_url(), +reset_username(), reset_password(), +reset_verbose(), reset_use_ssl(), +reset_buffersize(), reset_timeout_ms(), +reset_xoauth2_bearer();
  • -server capabilities method: list_server_capabilities();
  • +server capabilities method: +list_server_capabilities();
  • -mailbox operations methods: list_mail_folders(), select_folder(), examine_folder(), rename_folder(), create_folder(), list_flags();
  • +mailbox operations methods: +list_mail_folders(), select_folder(), +examine_folder(), rename_folder(), +create_folder(), list_flags();
  • -single-search methods: search_before(), search_since(), search_period(), search_on(), search_sent_before(),search_sent_since(), search_sent_period(), search_sent_on(), search_string(), search_flag(), search_smaller_than(), search_larger_than(), search_younger_than(), search_older_than();
  • +single-search methods: +search_before(), search_since(), +search_period(), search_on(), +search_sent_before(),search_sent_since(), +search_sent_period(), search_sent_on(), +search_string(), search_flag(), +search_smaller_than(), search_larger_than(), +search_younger_than(), +search_older_than();
  • -the custom-search method and its helper functions: search(); +the custom-search method and its helper functions: +search();
  • -fetch methods: fetch_body(), fetch_header(), fetch_text(), fetch_metadata(), fetch_attachments_list(), fetch_attachments();
  • +fetch methods: fetch_body(), +fetch_header(), fetch_text(), +fetch_metadata(), fetch_attachments_list(), +fetch_attachments();
  • -attachments methods: list_attachments(), get_attachments(), fetch_attachments_list(), fetch_attachments();
  • +attachments methods: +list_attachments(), get_attachments(), +fetch_attachments_list(), +fetch_attachments();
  • -complementary methods: copy_msg(), move_msg(), esearch_min_id(), esearch_max_id(), esearch_count_msg(), delete_msg(), expunge(), add_flags(), remove_flags(), replace_flags().
  • +complementary methods: copy_msg(), +move_msg(), esearch_min_id(), +esearch_max_id(), esearch_count_msg(), +delete_msg(), expunge(), +add_flags(), remove_flags(), +replace_flags().
-
-

Installation -

+
+

+Installation

 # CRAN version
-install.packages("mRpostman")
+install.packages("mRpostman")
 
 # Dev version
-if (!require('remotes')) install.packages('remotes')
-remotes::install_github("allanvc/mRpostman")
-
-
-

Basic Usage -

-
-

1) Configure an IMAP connection and list the server’s capabilities -

+if (!require('remotes')) install.packages('remotes') +remotes::install_github("allanvc/mRpostman")
+
+
+

+Basic Usage

+
+

+1) Configure an IMAP connection and list the server’s +capabilities

 
-library(mRpostman)
+library(mRpostman)
 
 # Outlook - Office 365
 con <- configure_imap(url="imaps://outlook.office365.com",
                       username="your_user@company.com",
-                      password=rstudioapi::askForPassword()
+                      password=rstudioapi::askForPassword()
 )
 
 # other IMAP providers that were tested: Hotmail ("imaps://imap-mail.outlook.com"),
@@ -241,9 +315,9 @@ 

1) con$list_server_capabilities()

-
-

2) List mail folders and select “INBOX” -

+
+

+2) List mail folders and select “INBOX”

 
 # Listing
@@ -252,18 +326,18 @@ 

2) List mail folders and select # Selecting con$select_folder(name = "INBOX")

-
-

3) Search messages by date -

+
+

+3) Search messages by date

 
 res1 <- con$search_on(date_char = "02-Jan-2020")
 
 res1
-
-

4) Customizing a search with multiple criteria -

+
+

+4) Customizing a search with multiple criteria

Executing a search by string:

 
@@ -275,150 +349,164 @@ 

4) Customizing a searc res2

-
-

5) Fetch messages’ text using single-search results -

+
+

+5) Fetch messages’ text using single-search results

 
-res3 <- con$search_string(expr = "Welcome!", where = "SUBJECT") %>%
+res3 <- con$search_string(expr = "Welcome!", where = "SUBJECT") %>%
   con$fetch_text(write_to_disk = TRUE) # also writes results to disk
 
 res3
-
-

6) Attachments -

+
+

+6) Attachments

You can list the attachments of one or more messages with:

-
    -
  1. the list_attachments() function:
  2. -
+

1) the list_attachments() function:

 
-con$search_since(date_char = "02-Jan-2020") %>%
-  con$fetch_text() %>% # or with fetch_body()
+con$search_since(date_char = "02-Jan-2020") %>%
+  con$fetch_text() %>% # or with fetch_body()
   list_attachments() # does not depend on the 'con' object

… or more directly with:

-
    -
  1. fetch_attachments_list()
  2. -
+

2) fetch_attachments_list()

 
-con$search_since(date_char = "02-Jan-2020") %>%
+con$search_since(date_char = "02-Jan-2020") %>%
   con$fetch_attachments_list()
-

If you want to download the attachments of one or more messages, there are also two ways of doing that.

-
    -
  1. Using the get_attachments() method:
  2. -
+

If you want to download the attachments of one or more messages, +there are also two ways of doing that.

+

1) Using the get_attachments() method:

 
-con$search_since(date_char = "02-Jan-2020") %>%
-  con$fetch_text() %>% # or with fetch_body()
+con$search_since(date_char = "02-Jan-2020") %>%
+  con$fetch_text() %>% # or with fetch_body()
   con$get_attachments()

… and more directly with the

-
    -
  1. -fetch_attachments() method:
  2. -
+

2) fetch_attachments() method:

 
-con$search_since(date_char = "02-Jan-2020") %>%
+con$search_since(date_char = "02-Jan-2020") %>%
   con$fetch_attachments()
-
-

Future Improvements -

+
+

+Future Improvements

  • add further IMAP features;
  • eliminate the {stringr} dependency in REGEX;
  • implement a progress bar in fetch operations;
-
-

Known bugs -

+
+

+Known bugs

    -
  • search results truncation: This is a libcurl’s known bug which causes the search results to be truncated when there is a large number of message ids returned. To circumvent this problem, you can set a higher buffersize value, increasing the buffer capacity, and verbose = TRUE for monitoring the server response for truncated results when executing a search. When possible, mRpostman tries to issue a warning for possible truncated values.

  • -
  • verbose = TRUE malfunction on Windows: This seems to be related to the {curl} R package. When using the verbose = TRUE on Windows, the flow of information between the IMAP server and the R session presents an intermittent behavior, which causes it to not be shown on the console, or with a considerable delay.

  • -
  • shared mailbox access not working: This seems to be another libcurl’s bug, although more tests need to be done to confirm it. It does not allow the user to connect to a shared mailbox. To circumvent this, if the shared mailbox has a password associated with it, you can try a direct regular connection.

  • -
  • xoauth2_bearer SASL error: This is related to old libcurl’s versions which causes the access token to not be properly passed to the server. This bug was fixed in libcurl 7.65.0. The problem is that many Linux distributions, such as Ubuntu 18.04, still provide libcurl 7.58.0 in their official distribution (libcurl4-openssl-dev). If you use a newer Linux distro such as Ubuntu 20.04, you should be fine as the distributed libcurl’s version will be above 7.65.0. Another alternative is to use plain authentication instead of OAuth2.0.

  • +
  • search results truncation: This is a libcurl’s +known bug which causes the search results to be truncated when there +is a large number of message ids returned. To circumvent this problem, +you can set a higher buffersize value, increasing the +buffer capacity, and verbose = TRUE for monitoring the +server response for truncated results when executing a search. When +possible, mRpostman tries to issue a warning for possible +truncated values.

  • +
  • verbose = TRUE malfunction on Windows: This +seems to be related to the {curl} R package. +When using the verbose = TRUE on Windows, the flow of +information between the IMAP server and the R session presents an +intermittent behavior, which causes it to not be shown on the console, +or with a considerable delay.

  • +
  • shared mailbox access not working: This seems to be +another libcurl’s bug, +although more tests need to be done to confirm it. It does not allow the +user to connect to a shared mailbox. To circumvent this, if the shared +mailbox has a password associated with it, you can try a direct regular +connection.

  • +
  • xoauth2_bearer SASL error: This is related +to old libcurl’s versions +which causes the access token to not be properly passed to the server. +This bug was fixed in libcurl 7.65.0. The problem is that many Linux +distributions, such as Ubuntu 18.04, still provide libcurl 7.58.0 in +their official distribution (libcurl4-openssl-dev). If you use a newer +Linux distro such as Ubuntu 20.04, you should be fine as the distributed +libcurl’s version will be above 7.65.0. Another alternative is to use +plain authentication instead of OAuth2.0.

-
-

License -

+
+

+License

This package is licensed under the terms of the GPL-3 License.

-
-

References -

-

Crispin, M. (2003), INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1, RFC 3501, March 2003, https://www.rfc-editor.org/rfc/rfc3501.

-

Heinlein, P. and Hartleben, P. (2008). The Book of IMAP: Building a Mail Server with Courier and Cyrus. No Starch Press. ISBN 978-1-59327-177-0.

-

Ooms, J. (2020), curl: A Modern and Flexible Web Client for R. R package version 4.3, https://CRAN.R-project.org/package=curl

-

Stenberg, D. Libcurl - The Multiprotocol File Transfer Library, https://curl.se/libcurl/

+
+

+References

+

Crispin, M. (2003), INTERNET MESSAGE ACCESS PROTOCOL - VERSION +4rev1, RFC 3501, March 2003, https://www.rfc-editor.org/rfc/rfc3501.

+

Heinlein, P. and Hartleben, P. (2008). The Book of IMAP: Building +a Mail Server with Courier and Cyrus. No Starch Press. ISBN +978-1-59327-177-0.

+

Ooms, J. (2020), curl: A Modern and Flexible Web Client for +R. R package version 4.3, https://CRAN.R-project.org/package=curl

+

Stenberg, D. Libcurl - The Multiprotocol File Transfer +Library, https://curl.se/libcurl/

-
-
-

License

+ - diff --git a/docs/news/index.html b/docs/news/index.html index f197f7c..39c6466 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -1,230 +1,502 @@ + -Changelog • mRpostman + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - Skip to contents - - -
+ + + + - -
-
-
+
+

+mRpostman 0.1.0 (2019-08-13 - Github release)

+
+
+ -
- +
+

Site built with pkgdown 1.6.1.

+
- +
+ - + + + + diff --git a/docs/pkgdown.js b/docs/pkgdown.js index 5fccd9c..7e7048f 100644 --- a/docs/pkgdown.js +++ b/docs/pkgdown.js @@ -2,30 +2,70 @@ (function($) { $(function() { - $('nav.navbar').headroom(); + $('.navbar-fixed-top').headroom(); - Toc.init({ - $nav: $("#toc"), - $scope: $("main h2, main h3, main h4, main h5, main h6") + $('body').css('padding-top', $('.navbar').height() + 10); + $(window).resize(function(){ + $('body').css('padding-top', $('.navbar').height() + 10); }); - if ($('#toc').length) { - $('body').scrollspy({ - target: '#toc', - offset: $("nav.navbar").outerHeight() + 1 - }); + $('[data-toggle="tooltip"]').tooltip(); + + var cur_path = paths(location.pathname); + var links = $("#navbar ul li a"); + var max_length = -1; + var pos = -1; + for (var i = 0; i < links.length; i++) { + if (links[i].getAttribute("href") === "#") + continue; + // Ignore external links + if (links[i].host !== location.host) + continue; + + var nav_path = paths(links[i].pathname); + + var length = prefix_length(nav_path, cur_path); + if (length > max_length) { + max_length = length; + pos = i; + } } - // Activate popovers - $('[data-bs-toggle="popover"]').popover({ - container: 'body', - html: true, - trigger: 'focus', - placement: "top", - sanitize: false, - }); + // Add class to parent
  • , and enclosing
  • if in dropdown + if (pos >= 0) { + var menu_anchor = $(links[pos]); + menu_anchor.parent().addClass("active"); + menu_anchor.closest("li.dropdown").addClass("active"); + } + }); + + function paths(pathname) { + var pieces = pathname.split("/"); + pieces.shift(); // always starts with / + + var end = pieces[pieces.length - 1]; + if (end === "index.html" || end === "") + pieces.pop(); + return(pieces); + } + + // Returns -1 if not found + function prefix_length(needle, haystack) { + if (needle.length > haystack.length) + return(-1); - $('[data-bs-toggle="tooltip"]').tooltip(); + // Special case for length-0 haystack, since for loop won't run + if (haystack.length === 0) { + return(needle.length === 0 ? 0 : -1); + } + + for (var i = 0; i < haystack.length; i++) { + if (needle[i] != haystack[i]) + return(i); + } + + return(haystack.length); + } /* Clipboard --------------------------*/ @@ -38,9 +78,9 @@ if(ClipboardJS.isSupported()) { $(document).ready(function() { - var copyButton = ""; + var copyButton = ""; - $("div.sourceCode").addClass("hasCopyButton"); + $(".examples, div.sourceCode").addClass("hasCopyButton"); // Insert copy buttons: $(copyButton).prependTo(".hasCopyButton"); @@ -49,108 +89,20 @@ $('.btn-copy-ex').tooltip({container: 'body'}); // Initialize clipboard: - var clipboard = new ClipboardJS('[data-clipboard-copy]', { + var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { text: function(trigger) { - return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, ""); + return trigger.parentNode.textContent; } }); - clipboard.on('success', function(e) { + clipboardBtnCopies.on('success', function(e) { changeTooltipMessage(e.trigger, 'Copied!'); e.clearSelection(); }); - clipboard.on('error', function() { + clipboardBtnCopies.on('error', function() { changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); }); - }); } - - /* Search marking --------------------------*/ - var url = new URL(window.location.href); - var toMark = url.searchParams.get("q"); - var mark = new Mark("main#main"); - if (toMark) { - mark.mark(toMark, { - accuracy: { - value: "complementary", - limiters: [",", ".", ":", "/"], - } - }); - } - - /* Search --------------------------*/ - /* Adapted from https://github.com/rstudio/bookdown/blob/2d692ba4b61f1e466c92e78fd712b0ab08c11d31/inst/resources/bs4_book/bs4_book.js#L25 */ - // Initialise search index on focus - var fuse; - $("#search-input").focus(async function(e) { - if (fuse) { - return; - } - - $(e.target).addClass("loading"); - var response = await fetch($("#search-input").data("search-index")); - var data = await response.json(); - - var options = { - keys: ["what", "text", "code"], - ignoreLocation: true, - threshold: 0.1, - includeMatches: true, - includeScore: true, - }; - fuse = new Fuse(data, options); - - $(e.target).removeClass("loading"); - }); - - // Use algolia autocomplete - var options = { - autoselect: true, - debug: true, - hint: false, - minLength: 2, - }; - var q; -async function searchFuse(query, callback) { - await fuse; - - var items; - if (!fuse) { - items = []; - } else { - q = query; - var results = fuse.search(query, { limit: 20 }); - items = results - .filter((x) => x.score <= 0.75) - .map((x) => x.item); - if (items.length === 0) { - items = [{dir:"Sorry 😿",previous_headings:"",title:"No results found.",what:"No results found.",path:window.location.href}]; - } - } - callback(items); -} - $("#search-input").autocomplete(options, [ - { - name: "content", - source: searchFuse, - templates: { - suggestion: (s) => { - if (s.title == s.what) { - return `${s.dir} >
    ${s.title}
    `; - } else if (s.previous_headings == "") { - return `${s.dir} >
    ${s.title}
    > ${s.what}`; - } else { - return `${s.dir} >
    ${s.title}
    > ${s.previous_headings} > ${s.what}`; - } - }, - }, - }, - ]).on('autocomplete:selected', function(event, s) { - window.location.href = s.path + "?q=" + q + "#" + s.id; - }); - }); })(window.jQuery || window.$) - - diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 6bc556c..dd638f0 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,9 +1,9 @@ pandoc: 2.19.2 -pkgdown: 2.0.7 +pkgdown: 1.6.1 pkgdown_sha: ~ articles: basics: basics.html code_migration: code_migration.html xoauth2.0: xoauth2.0.html -last_built: 2023-07-27T09:34Z +last_built: 2023-07-28T15:01Z diff --git a/docs/reference/AND.html b/docs/reference/AND.html index 50a66c9..3a9fa48 100644 --- a/docs/reference/AND.html +++ b/docs/reference/AND.html @@ -1,133 +1,223 @@ + -Relational-operator-function to construct a custom search statement — AND • mRpostman - Skip to contents - + + + + + -
    -
    -
    + + + -
    -

    Relational-operator-function to construct a custom search statement

    -
    + + + + + + + + + + + + + + -
    -

    Usage

    -
    AND(..., negate = FALSE)
    -
    -
    -

    Arguments

    -
    ...
    -

    a combination of criteria constructor functions with its arguments.

    -
    negate
    -

    If TRUE, negates the search and seeks for -"NOT search_criterion". Default is FALSE.

    + + + -
    -
    -

    Value

    - -

    A search string to be used as a request parameter in

    -

    -

    ImapCon$search() function.

    + + + + + + + + + + + + + +
    +
    +
    + +
    +
    + -
    -

    Examples

    -
    if (FALSE) {
    -# select folder & search
    -con$select_folder(name = "INBOX")
    -# search for messages SINCE "30-Ago-2019" AND SMALLER than 512KB.
    -res <- con$search(request = AND(sent_since(date_char = "30-Ago-2019"),
    -                                smaller_than(size = 512000)))
    -}
    -
    +
    +

    Relational-operator-function to construct a custom search statement

    -
    + +
    AND(..., negate = FALSE)
    + +

    Arguments

    + + + + + + + + + + +
    ...

    a combination of criteria constructor functions with its arguments.

    negate

    If TRUE, negates the search and seeks for +"NOT search_criterion". Default is FALSE.

    + +

    Value

    + +

    A search string to be used as a request parameter in + ImapCon$search() function.

    +

    See also

    + +

    Other custom search: +ImapCon, +OR(), +before(), +flag(), +larger_than(), +older_than(), +on(), +sent_before(), +sent_on(), +sent_since(), +since(), +smaller_than(), +string(), +younger_than()

    + +

    Examples

    +
    if (FALSE) {
    +# select folder & search
    +con$select_folder(name = "INBOX")
    +# search for messages SINCE "30-Ago-2019" AND SMALLER than 512KB.
    +res <- con$search(request = AND(sent_since(date_char = "30-Ago-2019"),
    +                                smaller_than(size = 512000)))
    +}
    +
    +
    + + -
    +
    + - - + + + diff --git a/docs/reference/ImapCon.html b/docs/reference/ImapCon.html index 1dd01d9..5b51876 100644 --- a/docs/reference/ImapCon.html +++ b/docs/reference/ImapCon.html @@ -1,79 +1,168 @@ + -An IMAP Connection Class — ImapCon • mRpostman - Skip to contents - + + + + + -
    -
    - -
    +
    +
    - - + + + diff --git a/docs/reference/OR.html b/docs/reference/OR.html index 1eb29f1..4e54e50 100644 --- a/docs/reference/OR.html +++ b/docs/reference/OR.html @@ -1,133 +1,223 @@ + -Relational-operator-function to construct a custom search statement — OR • mRpostman - Skip to contents - + + + + + -
    -
    -
    + + + -
    -

    Relational-operator-function to construct a custom search statement

    -
    + + + + + + + + + + + + + + -
    -

    Usage

    -
    OR(..., negate = FALSE)
    -
    -
    -

    Arguments

    -
    ...
    -

    a combination of criteria constructor functions with its arguments.

    -
    negate
    -

    If TRUE, negates the search and seeks for -"NOT search_criterion". Default is FALSE.

    + + + -
    -
    -

    Value

    - -

    A search string to be used as a request parameter in

    -

    -

    ImapCon$search() function.

    + + + + + + + + + + + + + +
    +
    +
    + +
    +
    + -
    -

    Examples

    -
    if (FALSE) {
    -# select folder & search
    -con$select_folder(name = "INBOX")
    -# search for messages SINCE "30-Ago-2019" OR SMALLER than 512KB.
    -res <- con$search(request = OR(sent_since(date_char = "30-Ago-2019"),
    -                                smaller_than(size = 512000)))
    -}
    -
    +
    +

    Relational-operator-function to construct a custom search statement

    -
    + +
    OR(..., negate = FALSE)
    + +

    Arguments

    + + + + + + + + + + +
    ...

    a combination of criteria constructor functions with its arguments.

    negate

    If TRUE, negates the search and seeks for +"NOT search_criterion". Default is FALSE.

    + +

    Value

    + +

    A search string to be used as a request parameter in + ImapCon$search() function.

    +

    See also

    + +

    Other custom search: +AND(), +ImapCon, +before(), +flag(), +larger_than(), +older_than(), +on(), +sent_before(), +sent_on(), +sent_since(), +since(), +smaller_than(), +string(), +younger_than()

    + +

    Examples

    +
    if (FALSE) {
    +# select folder & search
    +con$select_folder(name = "INBOX")
    +# search for messages SINCE "30-Ago-2019" OR SMALLER than 512KB.
    +res <- con$search(request = OR(sent_since(date_char = "30-Ago-2019"),
    +                                smaller_than(size = 512000)))
    +}
    +
    +
    + + -
    +
    + - - + + + diff --git a/docs/reference/before.html b/docs/reference/before.html index 992622c..c6f14ae 100644 --- a/docs/reference/before.html +++ b/docs/reference/before.html @@ -1,135 +1,225 @@ + -Criterion constructor function to be combined in a custom search statement — before • mRpostman - Skip to contents - + + + + + + +Criterion constructor function to be combined in a custom search statement — before • mRpostman + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
    -
    -
    +
    +
    - - + + + diff --git a/docs/reference/decode_mime_header.html b/docs/reference/decode_mime_header.html index d020301..63c2cb4 100644 --- a/docs/reference/decode_mime_header.html +++ b/docs/reference/decode_mime_header.html @@ -1,81 +1,167 @@ + -Decode RFC 2047 quoted-printable and base64 MIME headers and strings — decode_mime_header • mRpostman - Skip to contents - + + + + + + +Decode RFC 2047 quoted-printable and base64 MIME headers and strings — decode_mime_header • mRpostman + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
    + + + + - - -
    -
    +

    Examples

    +
    if (FALSE) {
    +# The examples below runs smoothly on any computer. The 'dontrun' flag is just to skip CRAN checks.
    +
    +# Simple quoted-printable string - Portuguese example
    +qp_encoded <- "Minist=E9rio_da_Educa=E7=E3o"
    +decoded_string <- decode_mime_header(string = qp_encoded)
    +
    +# Simple quoted-printable string - French example
    +qp_encoded <- "sur la route =C3=A0 suivre les voil=C3=A0 bient=C3=B4t qui te d=C3=A9gradent"
    +decoded_string <- decode_mime_header(string = qp_encoded)
    +
    +# RFC 2047 quoted-printable header - Portuguese example
    +qp_encoded <- "=?iso-8859-1?Q?DIDEC_Capacita=E7=E3o?="
    +decoded_string <- decode_mime_header(string = qp_encoded)
    +
    +# RFC 2047 quoted-printable - German example
    +qp_encoded <- "=?UTF-8?Q?stern=2Ede_-_t=C3=A4glich?="
    +decoded_string <- decode_mime_header(string = qp_encoded)
    +
    +# RFC 2047 base64 - Portuguese example
    +b64_encoded <- "=?utf-8?B?Sk9BTkEgRlVTQ08gTE9CTyBubyBUZWFtcw==?="
    +decoded_string <- decode_mime_header(string = b64_encoded)
    +}
    +
    +
    +
    + + -
    +
    + - - + + + diff --git a/docs/reference/flag.html b/docs/reference/flag.html index 4378594..5736627 100644 --- a/docs/reference/flag.html +++ b/docs/reference/flag.html @@ -1,127 +1,221 @@ + -Criterion constructor function to be combined in a custom search statement — flag • mRpostman - Skip to contents - + + + + + + +Criterion constructor function to be combined in a custom search statement — flag • mRpostman + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
    -
    -
    + -
    -

    Criterion constructor function to be combined in a custom search statement

    -
    + -
    -

    Usage

    -
    flag(name, negate = FALSE)
    +
    +
    + -
    -

    Arguments

    -
    name
    -

    A string containing one or more flags to search for. Use -ImapCon$list_flags() to list the flags -in a selected mail folder.

    - - -
    negate
    -

    If TRUE, negates the search and seeks for "NOT SEARCH -CRITERIA". Default is FALSE.

    - -
    -
    -

    See also

    -

    Other custom search: -AND(), -ImapCon, -OR(), -before(), -larger_than(), -older_than(), -on(), -sent_before(), -sent_on(), -sent_since(), -since(), -smaller_than(), -string(), -younger_than()

    +
    +

    Criterion constructor function to be combined in a custom search statement

    -
    -

    Examples

    -
    if (FALSE) {
    -# select folder & search
    -con$select_folder(name = "INBOX")
    -# search for messages with Flag "UNSEEN" AND NOT Smaller Than  512KB.
    -res <- con$search(request = AND(flag("UNSEEN"),
    -                                smaller_than(size = 512000, negate = TRUE)))
    -}
    -
    -
    -
    +
    flag(name, negate = FALSE)
    + +

    Arguments

    + + + + + + + + + + +
    name

    A string containing one or more flags to search for. Use +ImapCon$list_flags() to list the flags +in a selected mail folder.

    negate

    If TRUE, negates the search and seeks for "NOT SEARCH +CRITERIA". Default is FALSE.

    + +

    See also

    + +

    Other custom search: +AND(), +ImapCon, +OR(), +before(), +larger_than(), +older_than(), +on(), +sent_before(), +sent_on(), +sent_since(), +since(), +smaller_than(), +string(), +younger_than()

    + +

    Examples

    +
    if (FALSE) {
    +# select folder & search
    +con$select_folder(name = "INBOX")
    +# search for messages with Flag "UNSEEN" AND NOT Smaller Than  512KB.
    +res <- con$search(request = AND(flag("UNSEEN"),
    +                                smaller_than(size = 512000, negate = TRUE)))
    +}
    +
    +
    + + -
    +
    + - - + + + diff --git a/docs/reference/index.html b/docs/reference/index.html index a5568d4..8d04e16 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -1,189 +1,319 @@ + -Function reference • mRpostman + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - Skip to contents - + -
    -
    -
    - - -
    +
    +
    - - + + + diff --git a/docs/reference/larger_than.html b/docs/reference/larger_than.html index 0ea6711..e407292 100644 --- a/docs/reference/larger_than.html +++ b/docs/reference/larger_than.html @@ -1,129 +1,223 @@ + -Criterion constructor function to be combined in a custom search statement — larger_than • mRpostman - Skip to contents - + + + + + + +Criterion constructor function to be combined in a custom search statement — larger_than • mRpostman + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
    -
    -
    + -
    -

    Criterion constructor function to be combined in a custom search statement

    -
    + -
    -

    Usage

    -
    larger_than(size, negate = FALSE)
    +
    +
    + -
    -

    Arguments

    -
    size
    -

    An integer specifying the number of seconds to be used as -search criterion.

    - - -
    negate
    -

    If TRUE, negates the search and seeks for "NOT SEARCH -CRITERIA". Default is FALSE.

    - -
    -
    -

    See also

    -

    Other custom search: -AND(), -ImapCon, -OR(), -before(), -flag(), -older_than(), -on(), -sent_before(), -sent_on(), -sent_since(), -since(), -smaller_than(), -string(), -younger_than()

    +
    +

    Criterion constructor function to be combined in a custom search statement

    -
    -

    Examples

    -
    if (FALSE) {
    -# select folder & search
    -con$select_folder(name = "INBOX")
    -# search for messages containing the string "XYZ@k-state.edu" in the
    -#   "FROM" field OR those that are LARGER than 512KB.
    -res <- con$search(request = OR(string(expr = "XYZ@k-state.edu",
    -                                      where = "FROM"),
    -                               larger_than(size = 512000)))
    -}
    -
    -
    -
    -
    +
    larger_than(size, negate = FALSE)
    + +

    Arguments

    + + + + + + + + + + +
    size

    An integer specifying the number of seconds to be used as +search criterion.

    negate

    If TRUE, negates the search and seeks for "NOT SEARCH +CRITERIA". Default is FALSE.

    + +

    See also

    + +

    Other custom search: +AND(), +ImapCon, +OR(), +before(), +flag(), +older_than(), +on(), +sent_before(), +sent_on(), +sent_since(), +since(), +smaller_than(), +string(), +younger_than()

    + +

    Examples

    +
    if (FALSE) {
    +# select folder & search
    +con$select_folder(name = "INBOX")
    +# search for messages containing the string "XYZ@k-state.edu" in the
    +#   "FROM" field OR those that are LARGER than 512KB.
    +res <- con$search(request = OR(string(expr = "XYZ@k-state.edu",
    +                                      where = "FROM"),
    +                               larger_than(size = 512000)))
    +}
    +
    +
    +
    + + -
    +
    + - - + + + diff --git a/docs/reference/list_attachments.html b/docs/reference/list_attachments.html index 6b823ed..f43a3b6 100644 --- a/docs/reference/list_attachments.html +++ b/docs/reference/list_attachments.html @@ -1,127 +1,216 @@ + -List attachments and content-disposition types — list_attachments • mRpostman - Skip to contents - + + + + + + +List attachments and content-disposition types — list_attachments • mRpostman + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
    -
    +

    See also

    + +

    Other attachments: +ImapCon

    + +

    Examples

    +
    if (FALSE) {
    +con$select_folder(name = "INBOX")
    +# do a search followed by a fetch operation, then extract the attachments' list
    +out <- con$search_string(expr = "@k-state.edu", where = "FROM") %>%
    +  con$fetch_body()
    +att_list <- list_attachments(msg_list = out)
    +
    +# or
    +att_list <- con$search_string(expr = "@k-state.edu", where = "FROM") %>%
    +  con$fetch_body() %>%
    +  list_attachments()
    +}
    +
    +
    + + -
    +
    + - - + + + diff --git a/docs/reference/mRpostman-package.html b/docs/reference/mRpostman-package.html index a61738d..dc6c98c 100644 --- a/docs/reference/mRpostman-package.html +++ b/docs/reference/mRpostman-package.html @@ -1,110 +1,206 @@ + -An IMAP client for R — mRpostman-package • mRpostman + + + + + +An IMAP client for R — mRpostman-package • mRpostman + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - Skip to contents - + and several other IMAP features, paving the way for e-mail data analysis in R." /> + -
    -
    -
    +
    + + + -
    +
    + - - + + + diff --git a/docs/reference/metadata_options.html b/docs/reference/metadata_options.html index 78b91da..6717147 100644 --- a/docs/reference/metadata_options.html +++ b/docs/reference/metadata_options.html @@ -1,113 +1,201 @@ + -Message Metadata Options — metadata_options • mRpostman - Skip to contents - + + + + + + +Message Metadata Options — metadata_options • mRpostman + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
    -
    + https://www.rfc-editor.org/info/rfc2060.

    + +

    Examples

    +
    if (FALSE) {
    +
    +library(mRpostman)
    +metadata_options()
    +
    +}
    +
    +
    + + -
    +
    + - - + + + diff --git a/docs/reference/older_than.html b/docs/reference/older_than.html index 9e44165..661863b 100644 --- a/docs/reference/older_than.html +++ b/docs/reference/older_than.html @@ -1,134 +1,227 @@ + -Criterion constructor function to be combined in a custom search statement — older_than • mRpostman - Skip to contents - + + + + + + +Criterion constructor function to be combined in a custom search statement — older_than • mRpostman + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
    -
    +

    See also

    + +

    Other custom search: +AND(), +ImapCon, +OR(), +before(), +flag(), +larger_than(), +on(), +sent_before(), +sent_on(), +sent_since(), +since(), +smaller_than(), +string(), +younger_than()

    + +

    Examples

    +
    if (FALSE) {
    +# select folder & search
    +con$select_folder(name = "INBOX")
    +# search for messages containing the string "XYZ@k-state.edu" in the
    +#   "FROM" field AND those that are OLDER than 3600 seconds (1 hour).
    +res <- con$search(request = AND(string(expr = "XYZ@k-state.edu",
    +                                      where = "FROM"),
    +                               older_than(seconds = 3600)))
    +}
    +
    +
    +
    + + -
    +
    + - - + + + diff --git a/docs/reference/on.html b/docs/reference/on.html index b820c5f..63cf7c6 100644 --- a/docs/reference/on.html +++ b/docs/reference/on.html @@ -1,137 +1,227 @@ + -Criterion constructor function to be combined in a custom search statement — on • mRpostman - Skip to contents - + + + + + + +Criterion constructor function to be combined in a custom search statement — on • mRpostman + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
    -
    + + + + - -
    -
    -
    + +
    + +
    -
    +
    + - - + + + diff --git a/docs/reference/sent_before.html b/docs/reference/sent_before.html index 278f5ab..4ba0b4c 100644 --- a/docs/reference/sent_before.html +++ b/docs/reference/sent_before.html @@ -1,135 +1,225 @@ + -Criterion constructor function to be combined in a custom search statement — sent_before • mRpostman - Skip to contents - + + + + + + +Criterion constructor function to be combined in a custom search statement — sent_before • mRpostman + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
    -
    + + + + - -
    -
    -
    + + + + - -
    -
    -
    + + + + - -
    -
    -
    - -
    -
    -
    -
    + -
    -

    Criterion constructor function to be combined in a custom search statement

    -
    + -
    -

    Usage

    -
    smaller_than(size, negate = FALSE)
    +
    +
    + -
    -

    Arguments

    -
    size
    -

    An integer specifying the number of seconds to be used as -search criterion.

    - - -
    negate
    -

    If TRUE, negates the search and seeks for "NOT SEARCH -CRITERIA". Default is FALSE.

    - -
    -
    -

    See also

    -

    Other custom search: -AND(), -ImapCon, -OR(), -before(), -flag(), -larger_than(), -older_than(), -on(), -sent_before(), -sent_on(), -sent_since(), -since(), -string(), -younger_than()

    +
    +

    Criterion constructor function to be combined in a custom search statement

    -
    -

    Examples

    -
    if (FALSE) {
    -# select folder & search
    -con$select_folder(name = "INBOX")
    -# search for messages containing the string "XYZ@k-state.edu" in the
    -# "FROM" field OR those that are SMALLER than 512KB.
    -res <- con$search(request = OR(string(expr = "XYZ@k-state.edu",
    -                                      where = "FROM"),
    -                               smaller_than(size = 512000)))
    -}
    -
    -
    -
    -
    +
    smaller_than(size, negate = FALSE)
    + +

    Arguments

    + + + + + + + + + + +
    size

    An integer specifying the number of seconds to be used as +search criterion.

    negate

    If TRUE, negates the search and seeks for "NOT SEARCH +CRITERIA". Default is FALSE.

    + +

    See also

    + +

    Other custom search: +AND(), +ImapCon, +OR(), +before(), +flag(), +larger_than(), +older_than(), +on(), +sent_before(), +sent_on(), +sent_since(), +since(), +string(), +younger_than()

    + +

    Examples

    +
    if (FALSE) {
    +# select folder & search
    +con$select_folder(name = "INBOX")
    +# search for messages containing the string "XYZ@k-state.edu" in the
    +# "FROM" field OR those that are SMALLER than 512KB.
    +res <- con$search(request = OR(string(expr = "XYZ@k-state.edu",
    +                                      where = "FROM"),
    +                               smaller_than(size = 512000)))
    +}
    +
    +
    +
    + +
    -
    +
    +
    - - + + + diff --git a/docs/reference/string.html b/docs/reference/string.html index 61038ed..9184623 100644 --- a/docs/reference/string.html +++ b/docs/reference/string.html @@ -1,135 +1,229 @@ + -Criterion constructor function to be combined in a custom search statement — string • mRpostman - Skip to contents - + + + + + + +Criterion constructor function to be combined in a custom search statement — string • mRpostman + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
    - -
    -
    -
    -
    + -
    -

    Criterion constructor function to be combined in a custom search statement

    -
    + -
    -

    Usage

    -
    string(expr, where, negate = FALSE)
    +
    +
    + -
    -

    Arguments

    -
    expr
    -

    A character string specifying the word or expression to search -for in messages.

    - - -
    where
    -

    A mandatory character string specifying in which -message's Section or Header Field to search for the provided string.

    - - -
    negate
    -

    If TRUE, negates the search and seeks for "NOT SEARCH -CRITERIA". Default is FALSE.

    - -
    -
    -

    See also

    -

    Other custom search: -AND(), -ImapCon, -OR(), -before(), -flag(), -larger_than(), -older_than(), -on(), -sent_before(), -sent_on(), -sent_since(), -since(), -smaller_than(), -younger_than()

    +
    +

    Criterion constructor function to be combined in a custom search statement

    -
    -

    Examples

    -
    if (FALSE) {
    -# select folder & search
    -con$select_folder(name = "INBOX")
    -# search for messages containing the string "XYZ@k-state.edu" in the
    -#   "FROM" AND the string "@gmail.com" in the "CC" field.
    -res <- con$search(request = AND(string(expr = "XYZ@k-state.edu",
    -                                      where = "FROM"),
    -                               string(expr = "@gmail.com",
    -                                      where = "CC")))
    -}
    -
    -
    -
    -
    +
    string(expr, where, negate = FALSE)
    + +

    Arguments

    + + + + + + + + + + + + + + +
    expr

    A character string specifying the word or expression to search +for in messages.

    where

    A mandatory character string specifying in which +message's Section or Header Field to search for the provided string.

    negate

    If TRUE, negates the search and seeks for "NOT SEARCH +CRITERIA". Default is FALSE.

    + +

    See also

    + +

    Other custom search: +AND(), +ImapCon, +OR(), +before(), +flag(), +larger_than(), +older_than(), +on(), +sent_before(), +sent_on(), +sent_since(), +since(), +smaller_than(), +younger_than()

    + +

    Examples

    +
    if (FALSE) {
    +# select folder & search
    +con$select_folder(name = "INBOX")
    +# search for messages containing the string "XYZ@k-state.edu" in the
    +#   "FROM" AND the string "@gmail.com" in the "CC" field.
    +res <- con$search(request = AND(string(expr = "XYZ@k-state.edu",
    +                                      where = "FROM"),
    +                               string(expr = "@gmail.com",
    +                                      where = "CC")))
    +}
    +
    +
    +
    + + -
    +
    + - - + + + diff --git a/docs/reference/younger_than.html b/docs/reference/younger_than.html index 95fded0..25d6717 100644 --- a/docs/reference/younger_than.html +++ b/docs/reference/younger_than.html @@ -1,134 +1,227 @@ + -Criterion constructor function to be combined in a custom search statement — younger_than • mRpostman - Skip to contents - + + + + + + +Criterion constructor function to be combined in a custom search statement — younger_than • mRpostman + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
    -
    +

    See also

    + +

    Other custom search: +AND(), +ImapCon, +OR(), +before(), +flag(), +larger_than(), +older_than(), +on(), +sent_before(), +sent_on(), +sent_since(), +since(), +smaller_than(), +string()

    + +

    Examples

    +
    if (FALSE) {
    +# select folder & search
    +con$select_folder(name = "INBOX")
    +# search for messages containing the string "XYZ@k-state.edu" in the
    +#   "FROM" field AND those that are YOUNGER than 3600 seconds (1 hour).
    +res <- con$search(request = AND(string(expr = "XYZ@k-state.edu",
    +                                      where = "FROM"),
    +                               younger_than(seconds = 3600)))
    +}
    +
    +
    +
    + + - + - - + + +