Learn R Programming

blastula (version 0.2.1)

send_email_out: Send an email message

Description

Send an email message to one or more recipients.

Usage

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)

Arguments

message

the email message object, as created by the compose_email() function. The object's class is email_message

from

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.

to

a vector of email addresses serving as primary recipients for the message. For secondary recipients, use the cc and bcc arguments.

subject

the subject of the message, which is usually a brief summary of the topic of the message.

cc

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.

bcc

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).

attachments

a vector of paths to files to be attached to the email.

attach_mime_types

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.

attach_encodings

an optional vector of encoding types to use for each of the attachments specified in attachments. Options are base64, 7bit, 8bit, or none.

attach_dispositions

an optional vector of disposition types for each of the attachments specified in attachments. Options are inline and attachment.

creds_file

an optional path to an email credentials file. This file must be created by the create_email_creds_file() function.

sender

the sender name.

host

the email host.

port

the port associated with the email account.

user

the username associated with the email account.

password

the password associated with the email account.

use_ssl

a logical value to indicate whether to use SSL.

use_tls

a logical value to indicate whether to use TLS.

authenticate

a logical value to indicate whether to use authentication.

ehlo

a logical value to indicate whether to force an EHLO command after connection to the SMTP host.

verbose

a logical value indicating whether verbose messages should be printed to the console during sending of email.

debug

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.