1

I am using sendmailR package to automate my email sending tasks. My code is like:

require(sendmailR)

from <- "test1@sample.com"

to <- 'test2@sample.com'

subject <- "Email Subject"

body <- "Email body."

mailControl=list(smtpServer="mail.sample.com")

sendmail(from=from,to=to,subject=subject,msg=body,control=mailControl)

I have no problem running the above code using my 64 digits, outlook 2007, windows 7 machine, but get this error message once I running the same thing on a 32 digits, outlook 2010, windows xp machine:

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) : mail.sample.com:25 cannot be opened

anyone has any idea how this happened?

Mirko Ebert
  • 1,349
  • 1
  • 18
  • 36
user2854008
  • 1,161
  • 4
  • 17
  • 23

0 Answers0