Bamboo SparkPost Adapter v2.0.0 Bamboo.SparkPostHelper View Source
Functions for using features specific to SparkPost e.g. tagging
Link to this section Summary
Functions
Disable click tracking
Disable open tracking (SparkPost defaults to true)
Enables the inline CSS option
Mark an email as transactional
Add meta data to an email
Put extra message parameters that are used by SparkPost
Set a single tag or multiple tags for an email.
Link to this section Functions
Disable click tracking
Example
email |> disable_click_tracking
Disable open tracking (SparkPost defaults to true)
Example
email |> disable_open_tracking
Enables the inline CSS option
Example
email |> inline_css
Mark an email as transactional
Example
email |> mark_transactional
Add meta data to an email
Example
email
|> meta_data(foo: bar)
|> meta_data(%{bar: "baz")
Put extra message parameters that are used by SparkPost
Parameters set with this function are sent to SparkPost when used along with the Bamboo.SparkPostAdapter. You can set any additional parameters that the SparkPost API supports Other functions in this module provide a more convenient way of setting these parameters.
Example
email
|> put_param([:options, :open_tracking], false)
|> put_param(:tags, ["foo", "bar"])
|> put_param(:meta_data, %{foo: "bar"})
Set a single tag or multiple tags for an email.
Example
tag(email, "welcome-email")
tag(email, ["welcome-email", "marketing"])