View source: R/dynamic-templates.R
dynamic_template | R Documentation |
Create dynamic templates at https://mc.sendgrid.com/dynamic-templates.
dynamic_template(sg_mail, template_id, template_data, force = FALSE)
sg_mail |
(required) mail object from package |
template_id |
(required) template_id start "d-" and 32-length only digit and lower case alphabet like "d-4ad23ad40a0e47d0a0232b85f24ca5c2" |
template_data |
A key-value list for template data. (See https://docs.sendgrid.com/ui/sending-email/how-to-send-an-email-with-dynamic-templates) |
force |
pass template_id validation. default is FALSE. |
sg_mail class with dynamic template
mail() %>% dynamic_template("d-4ad23ad40a0e47d0a0232b85f24ca5c2", list(first_name = "Amanda", link = "foo")) mail() %>% dynamic_template(template_id = "foo", template_data = list(first_name = "Amanda", link = "foo"), force = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.