Send an email message to one or more recipients.
send_email_out(message, from, to, subject = NULL, cc = NULL, bcc = NULL,
attachments = NULL, attach_mime_types = NULL, attach_encodings = NULL,
attach_dispositions = NULL, creds_file = NULL, sender = NULL,
host = NULL, port = NULL, user = NULL, password = NULL,
use_ssl = TRUE, use_tls = FALSE, authenticate = TRUE, ehlo = FALSE,
verbose = FALSE, debug = FALSE)
the email message object,
as created by the compose_email()
function. The object's class is
email_message
the email address of the sender. This does not have to be the same email that is associated with the account actually sending the message.
a vector of email addresses
serving as primary recipients for the
message. For secondary recipients, use
the cc
and bcc
arguments.
the subject of the message, which is usually a brief summary of the topic of the message.
a vector of email addresses for sending the message as a carbon copy. This list of for those who are to receive a copy of a message addressed primarily to another. The list of recipients in the CC list is visible to all other recipients of the message.
a vector of email addresses for sending the message as blind carbon copies. Any email addresses provided here will receive the message and these email addresses will be concealed from other recipients (including others on the BCC list).
a vector of paths to files to be attached to the email.
an optional
vector of mime types to use for
each of the attachments specified in
attachments
. If not provided,
mime types will be assigned based on
file extensions.
an optional
vector of encoding types to use for
each of the attachments specified in
attachments
. Options are
base64
, 7bit
,
8bit
, or none
.
an optional
vector of disposition types for each
of the attachments specified in
attachments
. Options are
inline
and attachment
.
an optional path to
an email credentials file. This file
must be created by the
create_email_creds_file()
function.
the sender name.
the email host.
the port associated with the email account.
the username associated with the email account.
the password associated with the email account.
a logical value to indicate whether to use SSL.
a logical value to indicate whether to use TLS.
a logical value to indicate whether to use authentication.
a logical value to indicate whether to force an EHLO command after connection to the SMTP host.
a logical value indicating whether verbose messages should be printed to the console during sending of email.
a logical value to indicate
whether the mail sending statement
should be printed to the console. No
emails are sent when debug is set to
TRUE
.