sendmail: Send mail from within R

Description Usage Arguments See Also Examples

View source: R/sendmailR.r

Description

Simplistic sendmail utility for R. Uses SMTP to submit a message to a local SMTP server.

Usage

1
2
sendmail(from, to, subject, msg, cc, bcc, ..., headers = list(),
  control = list())

Arguments

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 mime_part objects.

cc

Carbon-copy recipients (vector of valid RFC2822 style addresses).

bcc

Blind carbon-copy recipients (vector of valid RFC2822 style addresses).

headers

Any other headers to include.

control

List of SMTP server settings. Valid values are the possible options for sendmail_options.

...

...

See Also

mime_part for a way to add attachments.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
from <- sprintf("<[email protected]\\%s>", Sys.info()[4])
to <- "<[email protected]>"
subject <- "Hello from R"
body <- list("It works!", mime_part(iris))
sendmail(from, to, subject, body,
         control=list(smtpServer="ASPMX.L.GOOGLE.COM"))

## End(Not run)

sendmailR documentation built on May 2, 2019, 6:47 a.m.