即使允许安全性较低的应用访问(开启),也无法通过R发送电子邮件。
library(xtable)
library(mailR)
library(sendmailR)
library(rJava)
send.mail(from = "eduru.suresh@swiggy.in",
to = c("suresh.eduru1@gmail.com"),
subject= paste0("Report 1 : Raipur City Performance Metrics"),
body=print(xtable(Raipur,caption = "Raipur City Performance Metrics"),
type="html", caption.placement = "top"),
html = TRUE,
smtp = list(host.name="smtp.gmail.com",port=465,
user.name="xxxxxx@xxxx.in",
passwd="xxxxxxx",ssl=TRUE),
authenticate = TRUE,
send = TRUE)