extractBetween: Extracts eamil within given date range

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/extractBetween.R

Description

This function extracts email data from a specified folder with given date range

Usage

1
extractBetween(username, password, folder, startDate, endDate, nmail = -1)

Arguments

username

A character string of email address for example, "[email protected]"

password

A character string of password of the email address for example "xyz123"

folder

A character string of folder or label name from where we want to extract email data

startDate

A character starting of date (e.g "06-Jun-2013") of interest of the date range. The format of date should be same as shown in the example, any other format will give error

endDate

A character string of end date (e.g. "06-Jun-2013")of interest of the date range

nmail

An integer for the number of emails to extract, default is all emails (nmail=-1)

Details

This function is able to extract emails from any specified folder within a given date range. To extract "Sent Mail" or "Drafts" we have to specify the argument differently. To extract "Sent Mail", the argument is folder="[Gmal]/Sent Mail"

Value

n_message

Number of available email in the specified folder

data

The extracted data frame with the field unique id (uid), sender (from), receiver either direct or cc'd (to), subject of mail (subj), time stamp (datetime)

Note

To extract "Sent Mail", the argument is folder="[Gmal]/Sent Mail"

Author(s)

Jaynal Abedin

See Also

extractMbox

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# To extract maximum of 5 emails from inbox between June 6, 2013 to June 6, 2013
dat <-extractBetween(username="[email protected]",
                     password="password",
                     folder="INBOX",
                     startDate="06-Jun-2013",
                     endDate="06-Jun-2013",
                     nmail=5)
## End(Not run)

edeR documentation built on May 29, 2017, 9:27 a.m.