2

I have a table that I am trying to get to clients via sendmailR. I would like to stick to sendmailR as well. Here is what I am trying to do.

from <- 'my email'
to <- 'my email'
subject <- paste("the subject",Sys.Date(),sep=" ")
sendmail(from, to, subject, str, control = list(smtpServer="the correct server sits here"))

Sorry for all the censoring. Just know that this same exact code used to work about 4 months ago when I originally built the script it's in. Now to the error.

Here's what I am getting :

Error in wait_for(code) : SMTP Error: 5.7.1 Client was not authenticated

989
  • 12,579
  • 5
  • 31
  • 53
Tony
  • 83
  • 3
  • 10

2 Answers2

1

The error is probably that you are sending through a blocked port. The default port for sendmail is 25. If you are at a place where you don't control the servers, try asking a tech guy what server you need to set it as. Here's the command to do so. Add it before the sendmail() command

sendmail_options(smtpPort="25")

Change 25 to whatever port your tech guy tells you to.

Nedinator
  • 1,052
  • 13
  • 24
0

Try using mailR (https://cran.r-project.org/web/packages/mailR/index.html) that supports SMTP authentication.

Rahul Premraj
  • 1,595
  • 14
  • 13