[R] Remove dependency of Image's physical location while sending email.
Archit Soni
soni.archit1989 at gmail.com
Tue Mar 28 09:50:47 CEST 2017
Hello All,
I am using below code to send alerts from R. However, while testing the
emails to other users The image which is used as inline in email
configuration is not showing up as it is referencing to my temp folder.
Any ideas to resolve this ? I need to have embedded image irrespective of
the fact if the image gets deleted etc.
My Code:
(require(mailR))
y <- TriggerEmailR #my variable to trigger the script
#ImgSaveLocation - Local temp folder where image is saved.
bdy <- paste("<html><body> Hello, </br> </br> Avg. DIP has gone above 30
days <img src =" ,ImgSaveLocation, "> </br></br> Check the analysis:
</br></br> Note: This is a system generated email, please do not reply to
this email.</br></body></html>")
send.mail(from = "abc at abc.com",
to = c("Recipient 1 <>" ),
subject = "Alert",
body = bdy,
html = TRUE,
inline = TRUE,
smtp = list(host.name = "<<>>"),
authenticate = FALSE,
send = TRUE)
--
Thanks in advance,
Archit
[[alternative HTML version deleted]]
More information about the R-help
mailing list