2

everyone, I wish you would be kind enough to give me a hand.

I am trying to send a mail through R and have met some problems.

library(sendmailR)
from <- sprintf("<sendmailR@\\%s>", Sys.info()[4])
to <- "<myemail@gmail.com>"
subject <- "Hello from R"
body <- list("It works!", mime_part(iris))
sendmail(from, to, subject, body,
control=list(smtpServer="ASPMX.L.GOOGLE.COM"))


Error in socketConnection(host = server, port = port, blocking = TRUE) : 
cannot open the connection
In addition: Warning message:
In socketConnection(host = server, port = port, blocking = TRUE) :
ASPMX.L.GOOGLE.COM:25 cannot be opened

My OS is Windows 7 professional. Java version is: java version "1.7.0_25"

Thank you so much!

Sending an email from R using the sendmailR package the link is about the same question but on linux system.

Could someone be so kind to enlighten me on Windows System?

Thank you again!

Community
  • 1
  • 1
Levi Lau
  • 31
  • 1
  • 3

1 Answers1

-1

You could give the mailR package a try: http://rpremraj.github.io/mailR/

Rahul Premraj
  • 1,595
  • 14
  • 13