Methods for creating and sending MIME messages.
Usage
sg_mime()
sg_from(x, email)
sg_to(x, ...)
sg_cc(x, ...)
sg_bcc(x, ...)
sg_subject(x, subject)
sg_body(x, body, type = "text/html")
sg_attachments(x, ...)
sg_send(x, api_key = Sys.getenv("SENDGRID_API_KEY"))
Examples
if (FALSE) { # \dontrun{
sg_mime() |>
sg_from("sender@example.com") |>
sg_to("recipient1@example.com", "recipient2@example.com") |>
sg_cc("cc1@example.com", "cc2@example.com") |>
sg_bcc("bcc1@example.com", "bcc2@example.com") |>
sg_subject("This is the subject") |>
sg_body("Hello from sg!") |>
sg_attachments("path/to/file1.csv", "path/to/file2.pdf") |>
sg_send()
} # }