send: send mail

View source: R/send.R

sendR Documentation

send mail

Description

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

## Not run: 

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

## End(Not run)

sendgridr documentation built on Nov. 10, 2022, 5:15 p.m.