dynamic_template_data {sendgridr}R 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)

[Package sendgridr version 0.6.1 Index]