I am Working on googleVis
Chart and wanted to Embed gvis object (image stored as HTML) as inline using mailR
package.
I have the below code to send mail from my sever -
library(mailR)
send.mail(from = "admin_xxx@apsmail.xx.xxx.xx",
to = c("first.second@jba.com"),
subject = paste("Batch Job Stats on",now),
body = paste("Dear Sir/Madam,<br><br>
Please find below the image",".<br><br>",
"<img src=\"D:/xx/Batch_Processing/Batch_Processing_Run/Rplot1.png\">",".<br><br>"
),
html = TRUE,inline = TRUE,
smtp = list(host.name = "xxxx01.xxx.xxx.xx"),
authenticate = FALSE,
send = TRUE)
The above code is perfectly working fine - and I am embedding an image (present in the D drive of my server)
Now I am using googleVis
to create a chart and storing them in html
file.
(present in the D drive of my server)
Gauge <- gvisGauge(CityPopularity,
options=list(min=0, max=800, greenFrom=500,
greenTo=800, yellowFrom=300, yellowTo=500,
redFrom=0, redTo=300, width=400, height=300))
plot(Gauge)
print(Gauge, tag="chart", file="test1.html")
So now my question is that I am not able to embed my .html
file (created using above code - test1.html
) to send email with the googleVis
chart image embedded in the mail description body.(I am not able to save the gvis object -Chart as .png). I have seen solution - similar to this in SO, but it's not helping me.