Skip to contents

Wrapper for sendmailR::sendmail that does input checking and pulls in configuration data from the config.yml file

Usage

send_email(
  subject,
  body = paste("Sent by", Sys.info()["nodename"]),
  emails = config::get("tessiflow.email"),
  smtp = config::get("tessiflow.smtp"),
  engine = "curl",
  ...
)

Arguments

subject

string subject line

body

string body of email

emails

list of email addresses, default is from tessiflow.email configuration variable; from address will be the first email

smtp

named list, should contain hostname and (optionally) port, which defaults to 25. Additional elements will get merged with ... and passed to curl, see curl::curl_options for more details.

engine

One of:

  • "internal" for the internal smtp transport (default).

  • "curl" for the use of curl for transport. Enable if you need STARTTLS/SSL and/or SMTP authentication. See curl::send_mail.

  • "debug" sendmail returns a RFC2822 formatted email message without sending it.

...

additional parameters passed on to sendmailR::sendmail