sendgrid-mailer 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sendgrid/mailer.rb +7 -6
- data/lib/sendgrid/mailer/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: 8c29cf241cd721770582c1b63fb7672a1ccd285d
|
4
|
+
data.tar.gz: e43308d50272502221772c107fcbc086d81a85d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1471a452f253803bc3c13e5adbefc62762fee1b45def886d829dc323c3441037b5786d90df7f20922bcfe356741c34aad67edf87352a65ae8a6e406f7b8a3572
|
7
|
+
data.tar.gz: 8a497f04c6f3ab729e70a1972954ec5874a2bf1ae390a3658e780662e1d3205c92dd9d63bdaa01372e9f97d0db73902b0e632d4d81cacfbe87143bc137b1ee3e
|
data/lib/sendgrid/mailer.rb
CHANGED
@@ -7,21 +7,22 @@ module Sendgrid
|
|
7
7
|
class Mailer
|
8
8
|
include SendGrid
|
9
9
|
|
10
|
-
def initialize(api_key, from, bcc, sandbox_mode: false, dev_catch_all:)
|
11
|
-
@api_key
|
12
|
-
@from
|
13
|
-
@bcc
|
14
|
-
@sandbox_mode
|
10
|
+
def initialize(api_key, from, bcc, sandbox_mode: false, dev_catch_all: false)
|
11
|
+
@api_key = api_key
|
12
|
+
@from = from
|
13
|
+
@bcc = bcc
|
14
|
+
@sandbox_mode = sandbox_mode
|
15
15
|
@dev_catch_all = dev_catch_all
|
16
16
|
end
|
17
17
|
|
18
18
|
def build_mail_json(template_id:, to: nil, from: nil, bcc: nil, substitutions: {}, options: {})
|
19
19
|
options = {
|
20
|
-
force_send:
|
20
|
+
force_send: @sandbox_mode,
|
21
21
|
}.merge(options)
|
22
22
|
|
23
23
|
if @dev_catch_all
|
24
24
|
to = @dev_catch_all
|
25
|
+
bcc = nil
|
25
26
|
end
|
26
27
|
|
27
28
|
SendGrid::Mail.new.tap do |m|
|