Quantcast
Channel: ListenData
Viewing all articles
Browse latest Browse all 426

Send Email from R

$
0
0
In R, there is a package named mailR that allows you to send emails from R.
Send Email with R
R Code : Send Email from R
library(mailR)
send.mail(from="sandy.david@gmail.com",
to="deepanshu.bhalla@outlook.com",
subject="Test Email",
body="PFA the desired document",
html=T,
smtp=list(host.name = "smtp.gmail.com",
port = 465,
user.name = "sandy.david@gmail.com",
passwd = "xxxxxxxxx",
ssl = T),
authenticate=T,
attach.files="C:\\Users\\Deepanshu\\Downloads\\Nature of Expenses.xls")
You can use multiple recipients including the following code.
to = c("Recipient 1 <recipient1@gmail.com>", "recipient2@gmail.com"),
cc = c("CC Recipient <cc.recipient@gmail.com>"),
bcc = c("BCC Recipient <bcc.recipient@gmail.com>")

Viewing all articles
Browse latest Browse all 426

Latest Images

Trending Articles



Latest Images