sendgrid_actionmailer_adapter 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b18c8a752c45b55008f04261b87761e179e86ff1fee35307d1b06bf3829a7573
|
4
|
+
data.tar.gz: 33c3a4e3ecde09efc36807a7c49d1c17bd2e283b8a5578035c9b3b736092a98c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4dfd8da18aa10346ce0f64b0f0441117058e8fbd9a0e14f965e3383bdcbe71fd2818d10f16709f40a76c5e9724a785911b772772509a6a16ee297711dff03605
|
7
|
+
data.tar.gz: efb1d7977db06a20409d46062edc55bd3152d596cd7eb2c3ccf59fa1c29a71df56e6de0d6f75b165f12cef2df69d86219c81e935cecc63f9d83eba1fbae90adf
|
@@ -41,7 +41,7 @@ module SendGridActionMailerAdapter
|
|
41
41
|
end
|
42
42
|
|
43
43
|
with_retry(@settings[:retry]) do
|
44
|
-
@logger.info("Calling sendMail API, #{sendgrid_mail
|
44
|
+
@logger.info("Calling sendMail API, #{extract_log_info(sendgrid_mail)}")
|
45
45
|
response = sendgrid_client.mail._('send').post(request_body: sendgrid_mail.to_json)
|
46
46
|
@logger.info("End calling sendMail API, status_code: #{response.status_code}")
|
47
47
|
handle_response!(response)
|
@@ -87,6 +87,13 @@ module SendGridActionMailerAdapter
|
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
90
|
+
def extract_log_info(sendgrid_mail)
|
91
|
+
{
|
92
|
+
subject: sendgrid_mail.subject,
|
93
|
+
personalizations: sendgrid_mail.personalizations,
|
94
|
+
}
|
95
|
+
end
|
96
|
+
|
90
97
|
# @see https://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html
|
91
98
|
def handle_response!(response)
|
92
99
|
case response.status_code.to_i
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sendgrid_actionmailer_adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ryu39
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sendgrid-ruby
|