I am working on a googleVis diagram and want to insert a gvis object (image stored as HTML) as inline using the mailR package.
I have the code below to send mail from my server -
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 works fine - and I embed the image (present on my serverโs D drive)
Now I use googleVis to create charts and save them in an html file. (present on drive D 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 canโt insert my .html file (created using the above code - test1.html ) to send email with googleVis graphic embedded in the body of the mail description. (I could not save the gvis -Chart object as .png). I saw a solution - similar to this in SO, but it does not help me.