1、library(mailR拘七呷憎)#body正文body = "this is a test"#收件人recipients <- c("ppp@xx.艘早祓胂com", "[email protected]")#发件人sender = "[email protected]"#主题title = "this is title"#填上邮箱密码code,如body是html,设置body=html参数,那么发出来的正文就是html格式的了---------------------作者:small_farmer来源:CSDN原文:https://blog.csdn.net/small_farmer/article/details/52713795版权声明:本文为博主原创文章,转载请附上博文链接!
2、send.mail( from = sender, to = recipients, subject = title, body = html, encoding = "utf-8", html = TRUE, smtp = list( host.name = "smtp.qq.com", port = 587, user.name = sender, passwd = "code", ssl = TRUE ), authenticate = TRUE, send = TRUE)