sendmailr

mailR: how to send rmarkdown documents as body in email?

老子叫甜甜 提交于 2019-11-29 14:41:02
问题 How to send rmarkdown generated documents as a body in an email, using R? I have successfully tried knitr with mailR , but when instead generating the html-report with the (new) rmarkdown -package it fails. library(mailR) send.mail( from = "FROM@gmail.com", to = "TO@gmail.com", subject = "MyMail", html = T, inline = T, body = "my_report.html", smtp = list(host.name = "smtp.gmail.com", port = 465, user.name = "USERNAME", passed = "PASSWORD", ssl = T), authenticate = T, send = T ) error: org

issue using sendemailR [duplicate]

隐身守侯 提交于 2019-11-29 12:21:58
This question already has an answer here: Use sendmailR with Windows 4 answers I am trying to use sendemailR package in R but I am getting an error I don't know how to fix. When trying the default parameters: library(sendmailR) from <- "your_email" to <- "your_email" subject <- "Test send email in R" body <- "It works!" mailControl=list(smtpServer="smtp.gmail.com") sendmail(from=from,to=to,subject=subject,msg=body,control=mailControl) I get the error Error in socketConnection(host = server, port = port, blocking = TRUE) : cannot open the connection In addition: Warning message: In

R shiny: how to save input data to the server or access input variables globally?

倖福魔咒の 提交于 2019-11-29 11:06:19
问题 I am making an application that asks the user a few basic survey questions. When this is done they are asked to provide a numeric input via a slidebar, press continue, then generate a plot, asks the user for input again, updates the plot, etc. The first input should be y1 on the plot, and the second input should be y2 on the plot, ect. But in addition I would like to save the data the user is inputting, so that I can access it in my R script globally, so it can be sent to me using sendmailR

Extracting Zip+CSV file from attachment w/ Image in Body of Email

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 10:35:20
I receive daily emails where there is an attachment containing 1 zip file containing 1 csv file. In the body of my email, there is an image that is being recognized as another attachment I am pretty sure. The below script works when there is only text in the body of the email but with the "Adobe Marketing Cloud" image, it is screwing up the script. Is there a way I can only read maybe the first attachment read (assuming that will be the zip file)? Here is my script: library(readr) library(RDCOMClient) outlook_app <- COMCreate("Outlook.Application") search <- outlook_app$AdvancedSearch( "Inbox"

Use sendmailR with Windows

南楼画角 提交于 2019-11-28 09:02:50
I'm trying to run sendmailR on Windows with the following code: ## Not run: from <- "<tal.galili@gmail.com>" # sprintf("<sendmailR@\\%s>", Sys.info()[4]) to <- "<tal.galili@gmail.com>" subject <- "Hello from R" body <- list("It works!", mime_part(iris)) sendmail(from, to, subject, body, control=list(smtpServer="ASPMX.L.GOOGLE.COM.")) And get the following error: Error in socketConnection(host = server, port = port, blocking = TRUE) : cannot open the connection In addition: Warning message: In socketConnection(host = server, port = port, blocking = TRUE) : smtp.gmail.com tal.galili@gmail.com

Email dataframe as table in email body with SendMailR

自古美人都是妖i 提交于 2019-11-28 06:37:30
I am trying to send a dataframe with SendMailR. I can send it as an attachment with reasonably good formatting. However I would like to send the dataframe in the body of the email. I tried capture.output, print, sprintf but am not even able to get the format close. e.g. I tried the following syntax for (i in 1:nrow(df)){ MSG = c(MSG,rownames(df)[1],as.character(unlist(df[i,])),'\n') } MSG = sprintf('%-10s',MSG) sendmail(from,to,subject,msg = list(MSG,attachment1,attachment2 ... )) In other words, I am thinking that it might be necessary to convert my dataframe into a format with /n and sprintf

Extracting Zip+CSV file from attachment w/ Image in Body of Email

不羁岁月 提交于 2019-11-27 03:06:15
问题 I receive daily emails where there is an attachment containing 1 zip file containing 1 csv file. In the body of my email, there is an image that is being recognized as another attachment I am pretty sure. The below script works when there is only text in the body of the email but with the "Adobe Marketing Cloud" image, it is screwing up the script. Is there a way I can only read maybe the first attachment read (assuming that will be the zip file)? Here is my script: library(readr) library

Use sendmailR with Windows

那年仲夏 提交于 2019-11-27 02:37:18
问题 I'm trying to run sendmailR on Windows with the following code: ## Not run: from <- "<tal.galili@gmail.com>" # sprintf("<sendmailR@\\%s>", Sys.info()[4]) to <- "<tal.galili@gmail.com>" subject <- "Hello from R" body <- list("It works!", mime_part(iris)) sendmail(from, to, subject, body, control=list(smtpServer="ASPMX.L.GOOGLE.COM.")) And get the following error: Error in socketConnection(host = server, port = port, blocking = TRUE) : cannot open the connection In addition: Warning message: In

How to send an email with attachment from R in windows

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 12:04:05
I have a scheduled an R script running from a windows machine. After it finishes, I wish this script to automatically send an email with some log file attached. Using shell() with some other scripts may be possible, but I was wondering if there is a better solution within R. Thanks. sendmailR works for me on Windows 7. I referenced http://cran.es.r-project.org/web/packages/sendmailR/sendmailR.pdf smtpServer= info for Outlook 2010 is in File -> Account Settings -> Account Settings -> double click your account -> text in "Server" box library(sendmailR) #set working directory setwd("C:

How to send an email with attachment from R in windows

梦想与她 提交于 2019-11-26 02:29:07
问题 I have a scheduled an R script running from a windows machine. After it finishes, I wish this script to automatically send an email with some log file attached. Using shell() with some other scripts may be possible, but I was wondering if there is a better solution within R. Thanks. 回答1: sendmailR works for me on Windows 7. I referenced http://cran.es.r-project.org/web/packages/sendmailR/sendmailR.pdf smtpServer= info for Outlook 2010 is in File -> Account Settings -> Account Settings ->