dynamic_template_data: Add dynamic template data

View source: R/dynamic-templates.R

dynamic_template_dataR Documentation

Add dynamic template data

Description

template_id must be included for this data to be applied.

Usage

dynamic_template_data(sg_mail, data)

Arguments

sg_mail

(required) mail object from package

data

A key-value list for template data. (See https://docs.sendgrid.com/ui/sending-email/how-to-send-an-email-with-dynamic-templates)

Value

sg_mail class with template data for dynamic transactional templates

Examples

data_lst <-
  list(
    first_name = "Amanda",
    link = "foo"
  )

mail() %>%
  template_id("d-4ad23ad40a0e47d0a0232b85f24ca5c2")%>%
  dynamic_template_data(data_lst)

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