bamboo v1.1.0 Bamboo.SendGridHelper View Source

Functions for using features specific to Sendgrid.

Example

email
|> with_template("80509523-83de-42b6-a2bf-54b7513bd2aa")
|> substitute("%name%", "Jon Snow")
|> substitute("%location%", "Westeros")

Link to this section Summary

Functions

Add a tag to the list of substitutions in the SendGrid template

An array of category names for this email. A maximum of 10 categories can be assigned to an email. Duplicate categories will be ignored and only unique entries will be sent

Specify the template for SendGrid to use for the context of the substitution tags

Link to this section Functions

Link to this function substitute(email, tag, value) View Source

Add a tag to the list of substitutions in the SendGrid template.

The tag must be a String.t due to SendGrid using special characters to wrap tags in the template.

Example

email
|> substitute("%name%", "Jon Snow")
Link to this function with_categories(email, categories) View Source

An array of category names for this email. A maximum of 10 categories can be assigned to an email. Duplicate categories will be ignored and only unique entries will be sent.

Example

email
|> with_categories("campaign-12345")
Link to this function with_template(email, template_id) View Source

Specify the template for SendGrid to use for the context of the substitution tags.

Example

email
|> with_template("80509523-83de-42b6-a2bf-54b7513bd2aa")