Learn R Programming

EasyHTMLReport (version 0.1.1)

sendmailEx: Extended version sendmailR::sendmail

Description

It is a function that extends the sendmailR :: sendmail. It is to be able to and can set the "content type" to "header" and send it to multiple destinations.

Usage

sendmailEx(from, to, subject, msg, headers = list(), control = list(),is.debug=F)

Arguments

from
From whom the mail message is (RFC2822 style address).
to
Recipient of the message (valid RFC2822 style address).
subject
Subject line of message.
msg
Body text of message or a list containing sendmailR::mime_part objects.
headers
Any other headers to include.
control
List of SMTP server settings. Valid values are the possible options for sendmailR::sendmail_options.
is.debug
debug flag. If TRUE, not send mail.

Examples

Run this code
## 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"))
# ## End(Not run)

Run the code above in your browser using DataLab