Skip to contents

Send mail with mail content.

Usage

send(mail)

Arguments

mail

mail object

Value

list if success, success message. and error, please check https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authentication.

Examples

if (FALSE) {

data_lst <-
  list(
    total = "$239.85",
    name = "Sample Name"
  )

mail() %>%
  from("example1@mail.com", "example name for display") %>%
  to("example2@mail.com", "example name for display 2") %>%
  dynamic_template_data(data_lst) %>%
  template_id(template_id) %>%
  subject("test mail title") %>%
  body("hello world!") %>%
  ## attachments is optional
  attachments("report.html") %>%
  send()
}