Automate the boring stuff with R: sending automated email

Notes and slides from my presentation at the LondonR meetup

Initial set up

# Load the required packages 
library(tidyverse)
library(htmlTable)
library(lubridate)
#install.packages("RDCOMClient", repos = "http://www.omegahat.net/R")
library("RDCOMClient")
library(readr)

Initiate the COM application programming interface.

## create an email outMail <-  OutApp$CreateItem(0)
## configure  email parameter outMail[["To"]] <-  "client@somecompany.com" 
outMail[["subject"]] <- "Hello"
outMail[["body"]] <- "Is it me you're looking for?" outMail[["Attachments"]]$Add("C:/Users/somepath/Admin.html")
## send it
outMail$Send()

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store