[R] eMail results out of R
(Ted Harding)
ted.harding at nessie.mcc.ac.uk
Thu Jul 12 19:03:23 CEST 2007
On 12-Jul-07 16:10:46, Stéphane Dray wrote:
> Here is a small function that I used on Debian. It requires exim4 :
>
> send.mail<-function(addr='dray at biomserv.univ-lyon1.fr',subject='A
> message from R',
> text=paste("I have finished to work
> ",Sys.time(),coll="")){
> # send an email
> # it requires the reconfiguration of exim4
> # you have to connect as root and
> # then type dpkg-reconfigure exim4config
I'm a bit puzzled by this. On any Unix/Linux system (unless
something has changed very recently which I haven't heard about),
the 'mail' command simply works, for any user (without having
to become root); does not require exim4 (or any particular version
of any particular mail agent--so long as something has to be set up
so that email can be sent at all), and (for the purpose of using
'mail' from R) does not require exim4 or any other mail agent to
be re-configured. The email will be sent "From:" the user who
is running R.
In the example I posted just now, I just used 'mail' in R's
system() command without doing anything special. The mail transfer
agent in my case is 'sendmail', but it's a standard configuration
and nothing special has been done.
> mail.cmd<-paste("mail ",
> "-s \"",subject,"\" ",
> addr,
> " << EOT &\n",
> text,"\n",
> "EOT",
> sep="",collapse="")
> system(mail.cmd,intern=FALSE)
> }
>
> Cheers,
>
> Romain Francois wrote:
>> Hi,
>>
>> There is a paper in the April 2007 issue of R News that might be of
>> help
>> here.
>> http://##cran mirror##/doc/Rnews/Rnews_2007-1.pdf
>>
>> Romain
>>
>> Duncan Murdoch wrote:
>>
>>> On 7/12/2007 9:52 AM, thomas.schwander at mvv.de wrote:
>>>
>>>
>>>> Hi everyone,
>>>>
>>>> I did my homework and read the posting guideline :-)
>>>>
>>>> I want to eMail the results of a computing automatically. So I get
>>>> the results (the parameters of a garch process) and I want to eMail
>>>> them to another person. How can I do that?
>>>>
>>>>
>>> This will depend on the system you're using. If the command
>>> "emailit"
>>> would work from the command line on your system, then
>>>
>>> system("emailit")
>>>
>>> should work from within R. Writing that command is the hard part, of
>>> course.
>>>
>>> Duncan Murdoch
>>>
>>>
>
>
> --
> Stéphane DRAY (dray at biomserv.univ-lyon1.fr )
> Laboratoire BBE-CNRS-UMR-5558, Univ. C. Bernard - Lyon I
> 43, Bd du 11 Novembre 1918, 69622 Villeurbanne Cedex, France
> Tel: 33 4 72 43 27 57 Fax: 33 4 72 43 13 88
> http://biomserv.univ-lyon1.fr/~dray/
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <ted.harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 12-Jul-07 Time: 18:03:20
------------------------------ XFMail ------------------------------
More information about the R-help
mailing list