Send Email Using R

Package contains a simple SMTP client with minimal dependencies which provides a portable solution for sending email, including file attachments and inline html reports, from within R. SMTP Authentication and SSL/STARTTLS is implemented using curl.


sendmailR

OSS Lifecycle CRAN status CRAN Downloads CRAN Downloads

Package contains a simple SMTP client with minimal dependencies which provides a portable solution for sending email, including file attachments and inline html reports, from within R. SMTP Authentication and SSL/STARTTLS is implemented using curl.

Usage

from <- sprintf("<sendmailR@@\%s>", Sys.info()[4]) 
to <- "<olafm@@datensplitter.net>" 
subject <- "Hello from R" 
body <- list("It works!", mime_part(iris)) 
sendmail(from, to, subject, body, 
  control=list(smtpServer="ASPMX.L.GOOGLE.COM")) 

# With authentication and SSL
sendmail(from="[email protected]", 
  to=c("[email protected]","[email protected]"), 
  subject="SMTP auth test", 
  msg=mime_part("This message was send using sendmailR and curl."), 
  engine = "curl", 
  engineopts = list(username = "foo", password = "bar"), 
  control=list(smtpServer="smtp://smtp.gmail.com:587", verbose = TRUE) 
)

Install from github

To install the bleeding edge version from GitHub using devtools:

library("devtools")
install_github("olafmersmann/sendmailR")

Or using pak:

library("pak")
pkg_install("olafmersmann/sendmailR")

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("sendmailR")

1.4-1 by Olaf Mersmann, 6 months ago


https://github.com/olafmersmann/sendmailR


Report a bug at https://github.com/olafmersmann/sendmailR/issues


Browse source code at https://github.com/cran/sendmailR


Authors: Olaf Mersmann [aut, cre] (ORCID: , Quinn Weber [ctb] , Marius Barth [ctb] , Are Edvardsen [ctb] , Alexander Bartel [ctb]


Documentation:   PDF Manual  


GPL-2 license


Imports base64enc

Suggests curl, knitr, rmarkdown, htmltools


Imported by BatchJobs.

Suggested by ParallelLogger, lgrExtra, polmineR.


See at CRAN