Bamboo Postmark Adapter v1.0.0 Bamboo.PostmarkHelper View Source
Functions for using features specific to Postmark e.g. templates
Link to this section Summary
Functions
Put extra message parameters that are used by Postmark. You can set things like TrackOpens, TrackLinks or Attachments
Set a single tag for an email that allows you to categorize outgoing emails and get detailed statistics
Send emails using Postmark's template API
Link to this section Functions
put_param(email, key, value) View Source
Put extra message parameters that are used by Postmark. You can set things like TrackOpens, TrackLinks or Attachments.
Example
put_param(email, "TrackLinks", "HtmlAndText")
put_param(email, "TrackOpens", true)
put_param(email, "Attachments", [
%{
Name: "file.txt",
Content: "/some/file.txt" |> File.read!() |> Base.encode64(),
ContentType: "txt"
}
])
tag(email, tag) View Source
Set a single tag for an email that allows you to categorize outgoing emails and get detailed statistics.
A convenience function for put_private(email, :tag, "my-tag")
Example
tag(email, "welcome-email")
template(email, template_id, template_model \\ %{}) View Source
Send emails using Postmark's template API.
Setup Postmark to send emails using a template. Use this in conjuction with the template content to offload template rendering to Postmark. The template id specified here must match the template id in Postmark. Postmarks's API docs for this can be found here.
Example
template(email, "9746128")
template(email, "9746128", %{"name" => "Name", "content" => "John"})