Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- used_pkgs <- c("mailR", "pipeR")
- if (!all(used_pkgs %in% installed.packages())){
- install.packages(used_pkgs[!used_pkgs %in% installed.packages()])
- }
- invisible(lapply(used_pkgs, library, character.only = TRUE))
- list.files("spend_file_folder", full.names = TRUE) %>>% lapply(function(x){
- to = "[email protected]",
- subject = "MAIL_TITLE",
- body = "no content",
- attach.files = x,
- smtp = list(host.name = "smtp.gmail.com", port = 465,
- user.name = "GMAIL_ACCCOUNT", passwd = "PASSWORD", ssl = TRUE),
- authenticate = TRUE,
- send = TRUE)
- })
Advertisement
Add Comment
Please, Sign In to add comment