Skip to content
Prev 69450 / 398513 Next

Does R have a command for sending emails?

I want to thank all who have offered help on this topic. I was able to
create a very simple email function that I have tested to work under
Windows XP Professional and R 2.1.0. It uses Blat version 1.9.4.

send.mail<-function(addr, subject, source.file) {
  mail.cmd <- paste("Blat", source.file, "-subject", dQuote(subject),
"-to", addr, separator = " ", collapse = "")
  
  system(mail.cmd, intern = FALSE)
}

The string source.file must have double backslashes instead of single
backslashes. For example:

C:\\myfolder

One must first install Blat version 1.9.4, available at 

http://www.blat.net/194/.

All that is needed is to unzip the downloaded file (Blat194.zip) and
copy Blat.exe to a folder in the path. The other files inside
Blat194.zip can be discarded.

FS
On 5/10/05, Frank E Harrell Jr <f.harrell at vanderbilt.edu> wrote: