mailgun_rails 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mailgun/deliverer.rb +8 -8
- data/lib/mailgun/mail_ext.rb +1 -1
- data/lib/mailgun/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3eb3586b44fc3032dfcf6cf3778c9a9b4565eee6
|
4
|
+
data.tar.gz: e7ff6e3420013419dfab185574d2515361707212
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f41934b3860ff3f6e828a7e85dd773be5010a0db8920d26014a464d1d0fb6d3653bf5a9b923c114825a868b445fb2c559cffc60ebead81d3ded711e47e78d5c7
|
7
|
+
data.tar.gz: c5610c1de48dea927f680c16d6e360fb40d730d9e409c71bad054f658b86ef09e0ec4d9b40d635d36ff5ea6ea3a4ec953adc604319b0512eeb9240da8d1b0322
|
data/lib/mailgun/deliverer.rb
CHANGED
@@ -32,16 +32,16 @@ module Mailgun
|
|
32
32
|
def transform_mailgun_attributes_from_rails(rails_message, mailgun_message)
|
33
33
|
transform_reply_to rails_message, mailgun_message if rails_message.reply_to
|
34
34
|
transform_mailgun_variables rails_message, mailgun_message
|
35
|
+
transform_mailgun_options rails_message, mailgun_message
|
35
36
|
transform_mailgun_recipient_variables rails_message, mailgun_message
|
36
37
|
transform_custom_headers rails_message, mailgun_message
|
37
|
-
transform_o_headers rails_message, mailgun_message
|
38
38
|
end
|
39
39
|
|
40
40
|
def build_basic_mailgun_message_for(rails_message)
|
41
41
|
{:from => rails_message[:from].formatted, :to => rails_message[:to].formatted, :subject => rails_message.subject,
|
42
42
|
:html => extract_html(rails_message), :text => extract_text(rails_message)}
|
43
43
|
end
|
44
|
-
|
44
|
+
|
45
45
|
def transform_reply_to(rails_message, mailgun_message)
|
46
46
|
mailgun_message['h:Reply-To'] = rails_message[:reply_to].formatted.first
|
47
47
|
end
|
@@ -69,17 +69,17 @@ module Mailgun
|
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
|
+
def transform_mailgun_options(rails_message, mailgun_message)
|
73
|
+
rails_message.mailgun_options.try(:each) do |name, value|
|
74
|
+
mailgun_message["o:#{name}"] = value
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
72
78
|
def transform_custom_headers(rails_message, mailgun_message)
|
73
79
|
rails_message.mailgun_headers.try(:each) do |name, value|
|
74
80
|
mailgun_message["h:#{name}"] = value
|
75
81
|
end
|
76
82
|
end
|
77
|
-
|
78
|
-
def transform_o_headers(rails_message, mailgun_message)
|
79
|
-
rails_message.mailgun_o_headers.try(:each) do |name, value|
|
80
|
-
mailgun_message["o:#{name}"] = value
|
81
|
-
end
|
82
|
-
end
|
83
83
|
|
84
84
|
def transform_mailgun_recipient_variables(rails_message, mailgun_message)
|
85
85
|
mailgun_message['recipient-variables'] = rails_message.mailgun_recipient_variables.to_json if rails_message.mailgun_recipient_variables
|
data/lib/mailgun/mail_ext.rb
CHANGED
data/lib/mailgun/version.rb
CHANGED