Learn R Programming

mRpostman (version 0.3.1)

configure_imap: IMAP Settings

Description

Configure IMAP server settings.

Usage

configure_imap(url, username, password, show_pass = FALSE,
  use_ssl = TRUE, verbose = FALSE, buffersize = 16000,
  fresh_connect = FALSE, timeout_ms = 5000, ...)

Arguments

url

String containing the IMAP server address

username

String containing the username.

password

String containing user's password.

show_pass

How to store user's password in imapconf object. Default is FALSE.

use_ssl

A Logical indicating the use or not of Secure Sockets Layer encryption when connecting to IMAP server. Default is TRUE.

verbose

If FALSE, mutes the output from the server. Default is FALSE.

buffersize

The size in bytes for curl's receive buffer. Default is 16000 bytes or 16kb, which means it will use the default value of libcurl. Maximum buffersize in libcurl documentation is 512kb (or 512000 bytes), but curl package accepts 2147483647 bytes without returning errors.

fresh_connect

If TRUE, opens a new curl connection for each IMAP command to be executed. Default is NULL. Nonetheless, most of mRpostman functions will set fresh_connect = TRUE for the retries in case of an connection error.

timeout_ms

Time in miliseconds (ms) to wait until a connection or a command to be executed. Default is 5000ms (or 5 seconds). If a first execution is frustated, an error handler in each function (depending on retires value), will try to reconnect or re-execute the command.

...

Further parameters added by mRpostman functions or IMAP parameters listed in curl::curl_options. Only for advanced users.

Value

An object of class imapconf containing the settings needed to connect to the IMAP server.

References

https://curl.haxx.se/libcurl/c/CURLOPT_BUFFERSIZE.html

Examples

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

Run the code above in your browser using DataLab