Skip to content

Commit

Permalink
Add tracking_domain variable to template mailer API call
Browse files Browse the repository at this point in the history
  • Loading branch information
kennym committed Nov 25, 2014
1 parent 4dbb2dd commit e9bd00a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/mandrill_mailer/template_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
# '[email protected]`
# 2)
# { email: '[email protected]', name: 'Bob Bertly' }
# 3)
# 3)
# [{ email: '[email protected]', name: 'Bob Bertly' },
# { email: '[email protected]', name: 'Claire Nayo' }]
#
Expand Down Expand Up @@ -175,6 +175,7 @@ def mandrill_mail(args)
"important" => args[:important],
"track_opens" => args.fetch(:track_opens, true),
"track_clicks" => args.fetch(:track_clicks, true),
"tracking_domain" => args[:tracking_domain],
"auto_text" => true,
"inline_css" => args[:inline_css],
"url_strip_qs" => args.fetch(:url_strip_qs, true),
Expand Down
4 changes: 4 additions & 0 deletions spec/template_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
send_at: send_at,
track_opens: false,
track_clicks: false,
tracking_domain: "",
url_strip_qs: false
}
end
Expand Down Expand Up @@ -90,6 +91,7 @@
send_at: send_at,
track_opens: false,
track_clicks: false,
tracking_domain: "",
url_strip_qs: false
}
end
Expand Down Expand Up @@ -250,6 +252,7 @@
"inline_css" => args[:inline_css],
"track_opens" => args[:track_opens],
"track_clicks" => args[:track_clicks],
"tracking_domain" => args[:tracking_domain],
"auto_text" => true,
"url_strip_qs" => args[:url_strip_qs],
"preserve_recipients" => false,
Expand Down Expand Up @@ -298,6 +301,7 @@
"inline_css" => args[:inline_css],
"track_opens" => args[:track_opens],
"track_clicks" => args[:track_clicks],
"tracking_domain" => args[:tracking_domain],
"auto_text" => true,
"url_strip_qs" => args[:url_strip_qs],
"preserve_recipients" => false,
Expand Down

0 comments on commit e9bd00a

Please sign in to comment.