Send Mail R and Socket Connections

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Send Mail R and Socket Connections

TwistedSkies
Good Afternoon All,

I am attempting to use the SendMailR function, I have checked with our I.T. department that I am using the correct server and I have the right permissions to connect and they have sent emails via this server but not through R and I have also checked that the port should be 25.

The code:



# E-Mail #

library(sendmailR)

from <- "david@work.com"
to <- "adam@work.com"
subject <- "Send Mail R- Test"
body <- "TESTING TESTING TESTING"                    
mailControl=list(smtpServer="uksmtp.global.local")

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




I receive the below error:


function (host = "localhost", port, server = FALSE, blocking = FALSE,
open = "a+", encoding = getOption("encoding"), timeout = getOption("timeout"))
.Internal(socketConnection(host, port, server, blocking, open,
encoding, timeout))
<bytecode: 0x00000000071beb18>
<environment: namespace:base>



So I figured its an error with or I needed to define a new socket connection, is this where the problem lies? Could anyone give me any pointers on where to go next with this to get it working?

Many Thanks in Advance!
Reply | Threaded
Open this post in threaded view
|

Re: Send Mail R and Socket Connections

Uwe Ligges-3


On 05.06.2013 11:56, TwistedSkies wrote:

> Good Afternoon All,
>
> I am attempting to use the SendMailR function, I have checked with our I.T.
> department that I am using the correct server and I have the right
> permissions to connect and they have sent emails via this server but not
> through R and I have also checked that the port should be 25.
>
> The code:
>
> /
>
> # E-Mail #
>
> library(sendmailR)
>
> from <- "[hidden email]"
> to <- "[hidden email]"
> subject <- "Send Mail R- Test"
> body <- "TESTING TESTING TESTING"
> mailControl=list(smtpServer="uksmtp.global.local")
>
> sendmail(from=from,to=to,subject=subject,msg=body,control=mailControl)
> /
>
>
>
> I receive the below error:
>
> /
> function (host = "localhost", port, server = FALSE, blocking = FALSE,
> open = "a+", encoding = getOption("encoding"), timeout =
> getOption("timeout"))
> .Internal(socketConnection(host, port, server, blocking, open,
> encoding, timeout))
> <bytecode: 0x00000000071beb18>
> <environment: namespace:base>
> /
>


This is not an error but the definition of the socketConnection() function.

If this is really the result, please contact the package maintainer
(CCIng) for details, assuming you have the most recent versions of R and
that package.

Best,
Uwe Ligges



>
> So I figured its an error with or I needed to define a new socket
> connection, is this where the problem lies? Could anyone give me any
> pointers on where to go next with this to get it working?
>
> Many Thanks in Advance!
>
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Send-Mail-R-and-Socket-Connections-tp4668699.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.