sendgrid-actionmailer 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/sendgrid_actionmailer/version.rb +1 -1
- data/lib/sendgrid_actionmailer.rb +5 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0cf44faa71a46698dd397f001b0ed5c07f00edc
|
4
|
+
data.tar.gz: 1feedab0fd41d4d9dbff84441f272bab024bf08d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 603221943d0dd4cc9446e68f3c77441930efa6f90545e7255e4af56eed0ab7fcf81e66d94ba6fbc72c9f8347db0922f54558ecb9ec6ea1f39ddb0a042520af51
|
7
|
+
data.tar.gz: 2976d343386bb783ed92088d6a3417175ed61441562661d71dac703298bf093e6122b84f6509f2bb010b07cbee4a474067e35e8cb19691cb0cff29e4beb2b602
|
data/README.md
CHANGED
@@ -228,3 +228,5 @@ Sendgrid unfortunately uses <% %> for their default substitution syntax, which m
|
|
228
228
|
* `<a href="%asm_group_unsubscribe_raw_url%">Unsubscribe</a>`
|
229
229
|
* `<a href="%asm_global_unsubscribe_raw_url%">Unsubscribe from List</a>`
|
230
230
|
* `<a href="%asm_preferences_raw_url%">Manage Email Preferences</a>`
|
231
|
+
|
232
|
+
Note: This feature, and substitutions in general, do not work in combination with dynamic templates.
|
@@ -23,7 +23,7 @@ module SendGridActionMailer
|
|
23
23
|
sendgrid_mail = Mail.new.tap do |m|
|
24
24
|
m.from = to_email(mail.from)
|
25
25
|
m.reply_to = to_email(mail.reply_to)
|
26
|
-
m.subject = mail.subject
|
26
|
+
m.subject = mail.subject || ""
|
27
27
|
# https://sendgrid.com/docs/Classroom/Send/v3_Mail_Send/personalizations.html
|
28
28
|
m.add_personalization(to_personalizations(mail))
|
29
29
|
end
|
@@ -83,10 +83,11 @@ module SendGridActionMailer
|
|
83
83
|
|
84
84
|
if mail['dynamic_template_data']
|
85
85
|
p.add_dynamic_template_data(json_parse(mail['dynamic_template_data'].value))
|
86
|
+
else
|
87
|
+
p.add_substitution(Substitution.new(key: "%asm_group_unsubscribe_raw_url%", value: "<%asm_group_unsubscribe_raw_url%>"))
|
88
|
+
p.add_substitution(Substitution.new(key: "%asm_global_unsubscribe_raw_url%", value: "<%asm_global_unsubscribe_raw_url%>"))
|
89
|
+
p.add_substitution(Substitution.new(key: "%asm_preferences_raw_url%", value: "<%asm_preferences_raw_url%>"))
|
86
90
|
end
|
87
|
-
p.add_substitution(Substitution.new(key: "%asm_group_unsubscribe_raw_url%", value: "<%asm_group_unsubscribe_raw_url%>"))
|
88
|
-
p.add_substitution(Substitution.new(key: "%asm_global_unsubscribe_raw_url%", value: "<%asm_global_unsubscribe_raw_url%>"))
|
89
|
-
p.add_substitution(Substitution.new(key: "%asm_preferences_raw_url%", value: "<%asm_preferences_raw_url%>"))
|
90
91
|
end
|
91
92
|
end
|
92
93
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sendgrid-actionmailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eddie Zaneski
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-11-
|
13
|
+
date: 2018-11-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: mail
|