sendgrid-mailer 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fca05509f6afcd530fd2c5a702208c59cba2767b
4
- data.tar.gz: 8876c3b9d1db2673a36b6a55e6747e61c93b27ce
3
+ metadata.gz: 8c29cf241cd721770582c1b63fb7672a1ccd285d
4
+ data.tar.gz: e43308d50272502221772c107fcbc086d81a85d9
5
5
  SHA512:
6
- metadata.gz: 512d134b2e37748457a5c0985d12369aa884ae1ef84785b6a12591e5963961aba74d6994ff315c6f2e31cb96f33dad1253fa769485520edd61c71f314b82664a
7
- data.tar.gz: 04128a33fae1cdaa8cfa6599d506ec56adc5da9e9389964ee1f58eafb58f8d936e6658b71979460270035d9fec05aa35b04f82426b244f4efcefca5d0e032086
6
+ metadata.gz: 1471a452f253803bc3c13e5adbefc62762fee1b45def886d829dc323c3441037b5786d90df7f20922bcfe356741c34aad67edf87352a65ae8a6e406f7b8a3572
7
+ data.tar.gz: 8a497f04c6f3ab729e70a1972954ec5874a2bf1ae390a3658e780662e1d3205c92dd9d63bdaa01372e9f97d0db73902b0e632d4d81cacfbe87143bc137b1ee3e
@@ -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 = api_key
12
- @from = from
13
- @bcc = bcc
14
- @sandbox_mode = 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: false,
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|
@@ -1,5 +1,5 @@
1
1
  module Sendgrid
2
2
  class Mailer
3
- VERSION = "0.1.7"
3
+ VERSION = "0.1.8"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sendgrid-mailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Watling