Bamboo Sparkpost Adapter v0.0.1 Bamboo.SparkpostHelper

Functions for using features specific to Sparkpost e.g. tagging

Summary

Functions

Disable click tracking

Disable open tracking (Sparkpost defaults to true)

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

Functions

disable_click_tracking(email)

Disable click tracking

Example

email |> disable_click_tracking
disable_open_tracking(email)

Disable open tracking (Sparkpost defaults to true)

Example

email |> disable_open_tracking
mark_transactional(email)

Mark an email as transactional

Example

email |> mark_transactional
meta_data(email, map)

Add meta data to an email

Example

email
|> meta_data(foo: bar)
|> meta_data(%{bar: "baz")
put_param(email, keys, value)

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"})
tag(email, tags)

Set a single tag or multiple tags for an email.

Example

tag(email, "welcome-email")
tag(email, ["welcome-email", "marketing"])