I want to send emails from R. This is what I have so far:
library(sendmailR)
from <- \"eamil@example.com\"
to <- \"email2@example.com\"
subject <-
library(mailR)
sender <- "abc@gmail.com"
recipients <- c("bcd@gmail.com","xyz@gmail.com")
send.mail(
from = sender,
to = recipients,
subject="Cash_Collected_Bank_transfer",
Sys.Date(),
"{}", body = Summary1, encoding = "utf-8", smtp =
list(host.name = "smtp.gmail.com", port = 465,
user.name="abc@gmail.com", passwd="abc@1234", ssl=TRUE),
authenticate = TRUE, send = TRUE ,
attach.files = c(path2), html = TRUE , inline = TRUE )