安装
1
|
install.packages("mailR")
|
使用
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
library(mailR) # 发件人邮箱 sender <- "[email protected]" # 收件人邮箱 recipients <- c("[email protected]","[email protected]") send.mail(from = sender, to = recipients, # 邮件标题 subject="Subject of the email", # 邮件内容 body = "Body of the email", # smtp信息 smtp = list( host.name = "...com.cn", port = 25, user.name = "[email protected]", passwd = "...", ssl = FALSE ), authenticate = TRUE, send = TRUE )
|
That’s all.
Happy writing!
近期评论