[R] sendmailR-package-valid code needed

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Mon Aug 23 17:23:52 CEST 2010


On Mon, Aug 23, 2010 at 3:55 PM, Velappan Periasamy <veepsirtt at gmail.com> wrote:
> Hello Chris Campbell ,
>
> I tried this for my email id it give me errors
>
>> from <- sprintf("<sendmailR@%s>", Sys.info()[4])
>> to <- "< veepsirtt at gmail.com>"
>> subject <- "Hello from R"
>> msg <- "It works!"
>> sendmail(from, to, subject, msg,control=list(smtpServer="ASPMX.L.GOOGLE.COM"))
>
> Error in waitFor(code) :
>  SMTP Error: 5.1.1 The email account that you tried to reach does not
> exist. Please try
> Calls: sendmail -> smtpSubmitMail -> sendCmd -> waitFor
>
> my email id is correct

 The sendmail function in the sendmailR package can't send email via a
server that uses SMTP-Authentication. Gmail's smtp server, which is
called smtp.gmail.com, relies on SMTP AUTH to make sure you are who
you say you are. The sendmail function doesn't know how to respond.

 It could be written to handle it, the outline of SMTP AUTH are here:

http://en.wikipedia.org/wiki/SMTP-AUTH

 and google's page detailing its SMTP service are here:

http://mail.google.com/support/bin/answer.py?hl=en&answer=13287
http://mail.google.com/support/bin/answer.py?hl=en&answer=78775

 and various other places.

 Short answer: no.

Barry



More information about the R-help mailing list