send_with_us 1.1.1 → 1.1.2

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 50a29f044caaf25f3d6d6630befd7cf4873eab3d
4
+ data.tar.gz: 86dedc6cbf4babb80d35c1bc4f53b3af256ed321
5
+ SHA512:
6
+ metadata.gz: 8da6203fb181dd5dfbc1a9bb91b5d1d152ac1d18a313e303a46f7c9c90b24379a0bce11e3133101ce4abb9e012f49d42d03620d33f0e25c8da868c5a4b770df6
7
+ data.tar.gz: 74c4b048fbcf6282bd499990fd74d7c1019988b9e64da3330afb17052d03ab2547e25441179bd7ca0f06d9871496d05a8e9593eb2a98c443ac1f8cf5a8941865
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- send_with_us (1.1.1)
4
+ send_with_us (1.1.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -65,6 +65,7 @@ begin
65
65
  { name: 'BCC2',
66
66
  address: 'bcc2@example.com' }
67
67
  ])
68
+ puts result
68
69
 
69
70
  # Attachment support
70
71
  result = obj.send_with(
@@ -77,7 +78,21 @@ begin
77
78
  [],
78
79
  [],
79
80
  ['path/to/file.txt'])
81
+ puts result
80
82
 
83
+ # Set ESP account
84
+ # See: https://help.sendwithus.com/support/solutions/articles/1000088976-set-up-and-use-multiple
85
+ result = obj.send_with(
86
+ 'email_id',
87
+ { name: 'Matt', address: 'recipient@example.com' },
88
+ { company_name: 'TestCo' },
89
+ { name: 'Company',
90
+ address: 'company@example.com',
91
+ reply_to: 'info@example.com' },
92
+ [],
93
+ [],
94
+ [],
95
+ 'esp_MYESPACCOUNT')
81
96
  puts result
82
97
  rescue => e
83
98
  puts "Error - #{e.class.name}: #{e.message}"
@@ -123,6 +138,11 @@ rescue => e
123
138
  end
124
139
  ```
125
140
 
141
+ Take a look at our Mailer that you can use to replace ActionMailer
142
+
143
+ [sendwithus_ruby_action_mailer](https://github.com/sendwithus/sendwithus_ruby_action_mailer)
144
+
145
+
126
146
  ## Errors
127
147
 
128
148
  The following errors may be generated:
@@ -23,7 +23,7 @@ module SendWithUs
23
23
  @configuration = SendWithUs::Config.new(settings)
24
24
  end
25
25
 
26
- def send_with(email_id, to, data = {}, from = {}, cc={}, bcc={}, files=[])
26
+ def send_with(email_id, to, data = {}, from = {}, cc={}, bcc={}, files=[], esp_account='')
27
27
 
28
28
  if email_id.nil?
29
29
  raise SendWithUs::ApiNilEmailId, 'email_id cannot be nil'
@@ -41,6 +41,9 @@ module SendWithUs
41
41
  if bcc.any?
42
42
  payload[:bcc] = bcc
43
43
  end
44
+ if esp_account
45
+ payload[:esp_account] = esp_account
46
+ end
44
47
 
45
48
  files.each do |path|
46
49
  file = open(path).read
@@ -1,3 +1,3 @@
1
1
  module SendWithUs
2
- VERSION = '1.1.1'
2
+ VERSION = '1.1.2'
3
3
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: send_with_us
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
5
- prerelease:
4
+ version: 1.1.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Matt Harris
@@ -11,54 +10,48 @@ authors:
11
10
  autorequire:
12
11
  bindir: bin
13
12
  cert_chain: []
14
- date: 2014-05-23 00:00:00.000000000 Z
13
+ date: 2014-07-17 00:00:00.000000000 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: rake
18
17
  requirement: !ruby/object:Gem::Requirement
19
- none: false
20
18
  requirements:
21
- - - ! '>='
19
+ - - '>='
22
20
  - !ruby/object:Gem::Version
23
21
  version: '0'
24
22
  type: :development
25
23
  prerelease: false
26
24
  version_requirements: !ruby/object:Gem::Requirement
27
- none: false
28
25
  requirements:
29
- - - ! '>='
26
+ - - '>='
30
27
  - !ruby/object:Gem::Version
31
28
  version: '0'
32
29
  - !ruby/object:Gem::Dependency
33
30
  name: shoulda
34
31
  requirement: !ruby/object:Gem::Requirement
35
- none: false
36
32
  requirements:
37
- - - ! '>='
33
+ - - '>='
38
34
  - !ruby/object:Gem::Version
39
35
  version: '0'
40
36
  type: :development
41
37
  prerelease: false
42
38
  version_requirements: !ruby/object:Gem::Requirement
43
- none: false
44
39
  requirements:
45
- - - ! '>='
40
+ - - '>='
46
41
  - !ruby/object:Gem::Version
47
42
  version: '0'
48
43
  - !ruby/object:Gem::Dependency
49
44
  name: mocha
50
45
  requirement: !ruby/object:Gem::Requirement
51
- none: false
52
46
  requirements:
53
- - - ! '>='
47
+ - - '>='
54
48
  - !ruby/object:Gem::Version
55
49
  version: '0'
56
50
  type: :development
57
51
  prerelease: false
58
52
  version_requirements: !ruby/object:Gem::Requirement
59
- none: false
60
53
  requirements:
61
- - - ! '>='
54
+ - - '>='
62
55
  - !ruby/object:Gem::Version
63
56
  version: '0'
64
57
  description: SendWithUs.com Ruby Client
@@ -90,27 +83,26 @@ files:
90
83
  - test/test_helper.rb
91
84
  homepage: https://github.com/sendwithus/sendwithus_ruby
92
85
  licenses: []
86
+ metadata: {}
93
87
  post_install_message:
94
88
  rdoc_options: []
95
89
  require_paths:
96
90
  - lib
97
91
  required_ruby_version: !ruby/object:Gem::Requirement
98
- none: false
99
92
  requirements:
100
- - - ! '>='
93
+ - - '>='
101
94
  - !ruby/object:Gem::Version
102
95
  version: '0'
103
96
  required_rubygems_version: !ruby/object:Gem::Requirement
104
- none: false
105
97
  requirements:
106
- - - ! '>='
98
+ - - '>='
107
99
  - !ruby/object:Gem::Version
108
100
  version: '0'
109
101
  requirements: []
110
102
  rubyforge_project:
111
- rubygems_version: 1.8.23
103
+ rubygems_version: 2.0.14
112
104
  signing_key:
113
- specification_version: 3
105
+ specification_version: 4
114
106
  summary: SendWithUs.com Ruby Client
115
107
  test_files:
116
108
  - test/lib/send_with_us/api_request_test.rb