sendmail | R Documentation |
Simplistic sendmail utility for R. Uses SMTP to submit a message to a local SMTP server.
sendmail( from, to, subject, msg, cc, bcc, ..., engine = c("internal", "curl", "debug"), headers = list(), control = list(), engineopts = list() )
from |
From whom the mail message is (RFC2822 style address). |
to |
Recipient of the message (vector of valid RFC2822 style addresses). |
subject |
Subject line of message. |
msg |
Body text of message or a list containing
|
cc |
Carbon-copy recipients (vector of valid RFC2822 style addresses). |
bcc |
Blind carbon-copy recipients (vector of valid RFC2822 style addresses). |
... |
... |
engine |
One of:
|
headers |
Any other headers to include. |
control |
List of SMTP server settings. Valid values are the
possible options for |
engineopts |
Options passed to curl if using the curl backend.
|
mime_part
for a way to add attachments.
curl::send_mail
for curl SMTP URL specification.
## Not run: 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")) sendmail(from="from@example.org", to=c("to1@example.org", "to2@example.org"), 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) ) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.