Skip to content

Instantly share code, notes, and snippets.

@Jianghao
Created March 26, 2015 12:27
Show Gist options
  • Save Jianghao/599d6f121ba99f4d4776 to your computer and use it in GitHub Desktop.
Save Jianghao/599d6f121ba99f4d4776 to your computer and use it in GitHub Desktop.
send email via qq with R
if("mailR" %in% rownames(installed.packages()) == FALSE) install.packages("mailR")
library(mailR)
send.mail.qq <- function(subject, passwd, body="Hello World"){
mailR::send.mail(from = "hellowangjh@qq.com",
to = "hellowangjh@qq.com",
subject = subject,
body = body,
smtp = list(host.name = "smtp.qq.com", port = 465,
user.name = "hellowangjh@qq.com", passwd = passwd, ssl = TRUE),
authenticate = TRUE,
send = TRUE)
return(NULL)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment