Created
March 26, 2015 12:27
-
-
Save Jianghao/599d6f121ba99f4d4776 to your computer and use it in GitHub Desktop.
send email via qq with R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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