Josh Kalish <[EMAIL PROTECTED]> wrote: > Has anyone used R to send out an email via an SMTP server?
If your system is Unix or Linux and you use a system call to "mail", you might be interested to know that "uuencode" is a good way to include attachments. Create a temp file containing your body text, then append the output of "uuencode" to the end of it. Here's a piece of code: temp <- tempfile("Smail.") cat(text, file=temp, sep="\n") for (i in seq(along=attach)) system(paste("uuencode", attach[i], name[i], ">>", temp)) recip <- paste(recip, collapse=" ") system(paste("mail -s '", subject, "' ", recip, "<", temp, sep=""), TRUE) unlink(temp) -- David Brahm ([EMAIL PROTECTED]) ______________________________________________ R-help@r-project.org 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.