mailgun-ruby 1.3.0 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +27 -0
- data/README.md +1 -2
- data/docs/MessageBuilder.md +12 -0
- data/lib/mailgun/client.rb +1 -0
- data/lib/mailgun/domains/domains.rb +19 -0
- data/lib/mailgun/events/events.rb +4 -4
- data/lib/mailgun/version.rb +1 -1
- data/mailgun.gemspec +1 -1
- data/spec/integration/routes_spec.rb +17 -1
- data/vcr_cassettes/bounces.yml +210 -1
- data/vcr_cassettes/complaints.yml +215 -5
- data/vcr_cassettes/domains.yml +777 -45
- data/vcr_cassettes/email_validation.yml +137 -8
- data/vcr_cassettes/events.yml +735 -2
- data/vcr_cassettes/exceptions.yml +48 -1
- data/vcr_cassettes/list_members.yml +343 -7
- data/vcr_cassettes/mailing_list.yml +301 -9
- data/vcr_cassettes/routes.yml +246 -246
- data/vcr_cassettes/send_message.yml +54 -3
- data/vcr_cassettes/stats.yml +47 -2
- data/vcr_cassettes/suppressions.yml +785 -0
- data/vcr_cassettes/unsubscribes.yml +215 -5
- metadata +17 -18
- data/docs/Messages.md +0 -107
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58558189e49961ad39adc2090139cfe44158ec4ef56386ce2af0ea1eee0fdaeb
|
4
|
+
data.tar.gz: 82445ca2c1f030e2721c49a0a9226ee39b655ca9864a146d95fb0db303a2e6cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7de45e9c8f998fff873aae0c659e0c67a1cd3e59f5fcb9c28c36cbf0c5d52a798f50fc841b8b704837f9e4981dd41f55e9dc7991ada76ccbb1259aeffdcb7f9
|
7
|
+
data.tar.gz: 0dc6b85bcb6517f33c55ee353943e695856d99f2a6b0c7fe956f0f30ecfea3bc436ad962ba676f9780e7bf9959d748ab962f9e6d1c6e9e1a63ae1bb006092f0f
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,33 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
|
5
5
|
## [Unreleased]
|
6
6
|
|
7
|
+
## [1.3.2] - 2025-01-30
|
8
|
+
|
9
|
+
### Fixed
|
10
|
+
|
11
|
+
- Use Faraday::FlatParamsEncoder (https://github.com/mailgun/mailgun-ruby/pull/334)
|
12
|
+
- Update Message Builder doc (https://github.com/mailgun/mailgun-ruby/pull/338)
|
13
|
+
- Add Domain api version warnings (https://github.com/mailgun/mailgun-ruby/pull/339)
|
14
|
+
|
15
|
+
## [1.3.1] - 2025-01-26
|
16
|
+
|
17
|
+
### Fixed
|
18
|
+
|
19
|
+
- Fix mock mailgun responds (https://github.com/mailgun/mailgun-ruby/pull/331)
|
20
|
+
- Change mime-types to runtime dependency (https://github.com/mailgun/mailgun-ruby/pull/332)
|
21
|
+
|
22
|
+
## [1.3.0] - 2025-01-26
|
23
|
+
|
24
|
+
### Added
|
25
|
+
|
26
|
+
- Faraday as http client (https://github.com/mailgun/mailgun-ruby/pull/330)
|
27
|
+
|
28
|
+
### Fixed
|
29
|
+
|
30
|
+
- Added documentation for updating webhook (https://github.com/mailgun/mailgun-ruby/pull/325)
|
31
|
+
- Remove duplicated entry from CHANGELOG (https://github.com/mailgun/mailgun-ruby/pull/318)
|
32
|
+
- Update template and metrics docs (https://github.com/mailgun/mailgun-ruby/pull/329)
|
33
|
+
|
7
34
|
## [1.2.16] - 2024-11-29
|
8
35
|
|
9
36
|
### Added
|
data/README.md
CHANGED
@@ -19,7 +19,7 @@ gem install mailgun-ruby
|
|
19
19
|
Gemfile:
|
20
20
|
|
21
21
|
```ruby
|
22
|
-
gem 'mailgun-ruby', '~>1.2
|
22
|
+
gem 'mailgun-ruby', '~>1.3.2'
|
23
23
|
```
|
24
24
|
|
25
25
|
Usage
|
@@ -181,7 +181,6 @@ For usage examples on each API endpoint, head over to our official documentation
|
|
181
181
|
pages. Or the [Snippets](docs/Snippets.md) file.
|
182
182
|
|
183
183
|
This SDK includes the following components:
|
184
|
-
- [Messages](docs/Messages.md)
|
185
184
|
- [Message Builder](docs/MessageBuilder.md)
|
186
185
|
- [Batch Message](docs/MessageBuilder.md#usage---batch-message)
|
187
186
|
- [Opt-In Handler](docs/OptInHandler.md)
|
data/docs/MessageBuilder.md
CHANGED
@@ -31,12 +31,18 @@ mb_obj.add_recipient(:to, "john.doe@example.com", {"first" => "John", "last" =>
|
|
31
31
|
# Define a cc recipient.
|
32
32
|
mb_obj.add_recipient(:cc, "sally.doe@example.com", {"first" => "Sally", "last" => "Doe"});
|
33
33
|
|
34
|
+
# Define the reply-to address.
|
35
|
+
mb_obj.reply_to("bob.doe@example.com", {"first" => "Bob", "last" => "Doe"});
|
36
|
+
|
34
37
|
# Define the subject.
|
35
38
|
mb_obj.subject("A message from the Ruby SDK using Message Builder!");
|
36
39
|
|
37
40
|
# Define the body of the message.
|
38
41
|
mb_obj.body_text("This is the text body of the message!");
|
39
42
|
|
43
|
+
# Define the HTML text of the message
|
44
|
+
mb_obj.body_html("<html><body><p>This is the text body of the message</p></body></html>");
|
45
|
+
|
40
46
|
# Set the Message-Id header, provide a valid Message-Id.
|
41
47
|
mb_obj.message_id("<20141014000000.11111.11111@example.com>")
|
42
48
|
|
@@ -63,6 +69,12 @@ mb_obj.add_inline_image "/path/to/file/header.png"
|
|
63
69
|
# Schedule message in the future
|
64
70
|
mb_obj.deliver_at("tomorrow 8:00AM PST");
|
65
71
|
|
72
|
+
# Turn Click Tracking on
|
73
|
+
mb_obj.track_clicks(true)
|
74
|
+
|
75
|
+
# Turn Click Tracking off
|
76
|
+
mb_obj.track_clicks(false)
|
77
|
+
|
66
78
|
# Finally, send your message using the client
|
67
79
|
result = mg_client.send_message("sending_domain.com", mb_obj)
|
68
80
|
|
data/lib/mailgun/client.rb
CHANGED
@@ -19,6 +19,7 @@ module Mailgun
|
|
19
19
|
#
|
20
20
|
# Returns [Array] A list of domains (hash)
|
21
21
|
def list(options = {})
|
22
|
+
warn('WARN: Client api version must be v4') unless @client.api_version == 'v4'
|
22
23
|
@client.get('domains', options).to_h['items']
|
23
24
|
end
|
24
25
|
alias_method :get_domains, :list
|
@@ -29,6 +30,7 @@ module Mailgun
|
|
29
30
|
#
|
30
31
|
# Returns [Hash] Information on the requested domains.
|
31
32
|
def info(domain)
|
33
|
+
warn('WARN: Client api version must be v4') unless @client.api_version == 'v4'
|
32
34
|
fail(ParameterError, 'No domain given to find on Mailgun', caller) unless domain
|
33
35
|
@client.get("domains/#{domain}").to_h!
|
34
36
|
end
|
@@ -43,6 +45,7 @@ module Mailgun
|
|
43
45
|
#
|
44
46
|
# Returns [Hash] Information on the updated/verified domains
|
45
47
|
def verify(domain)
|
48
|
+
warn('WARN: Client api version must be v4') unless @client.api_version == 'v4'
|
46
49
|
fail(ParameterError, 'No domain given to verify on Mailgun', caller) unless domain
|
47
50
|
@client.put("domains/#{domain}/verify", nil).to_h!
|
48
51
|
end
|
@@ -61,6 +64,7 @@ module Mailgun
|
|
61
64
|
#
|
62
65
|
# Returns [Hash] of created domain
|
63
66
|
def create(domain, options = {})
|
67
|
+
warn('WARN: Client api version must be v4') unless @client.api_version == 'v4'
|
64
68
|
fail(ParameterError, 'No domain given to add on Mailgun', caller) unless domain
|
65
69
|
options = { smtp_password: nil, spam_action: 'disabled', wildcard: false }.merge(options)
|
66
70
|
options[:name] = domain
|
@@ -75,6 +79,7 @@ module Mailgun
|
|
75
79
|
#
|
76
80
|
# Returns [Boolean] if successful or not
|
77
81
|
def remove(domain)
|
82
|
+
warn('WARN: Client api version must be v3') unless @client.api_version == 'v3'
|
78
83
|
fail(ParameterError, 'No domain given to remove on Mailgun', caller) unless domain
|
79
84
|
@client.delete("domains/#{domain}").to_h['message'] == 'Domain has been deleted'
|
80
85
|
end
|
@@ -95,6 +100,7 @@ module Mailgun
|
|
95
100
|
#
|
96
101
|
# Returns [Hash] of updated domain
|
97
102
|
def update(domain, options = {})
|
103
|
+
warn('WARN: Client api version must be v4') unless @client.api_version == 'v4'
|
98
104
|
fail(ParameterError, 'No domain given to update on Mailgun', caller) unless domain
|
99
105
|
@client.put("domains/#{domain}", options).to_h
|
100
106
|
end
|
@@ -108,6 +114,7 @@ module Mailgun
|
|
108
114
|
#
|
109
115
|
# Returns [Hash] with message key
|
110
116
|
def create_smtp_credentials(domain, options = {})
|
117
|
+
warn('WARN: Client api version must be v3') unless @client.api_version == 'v3'
|
111
118
|
fail(ParameterError, 'No domain given to create credentials on Mailgun', caller) unless domain
|
112
119
|
@client.post("domains/#{domain}/credentials", options).to_h
|
113
120
|
end
|
@@ -121,6 +128,7 @@ module Mailgun
|
|
121
128
|
#
|
122
129
|
# Returns [Hash] with message key
|
123
130
|
def update_smtp_credentials(domain, login, options = {})
|
131
|
+
warn('WARN: Client api version must be v3') unless @client.api_version == 'v3'
|
124
132
|
fail(ParameterError, 'No domain given to update credentials on Mailgun', caller) unless domain
|
125
133
|
fail(ParameterError, 'No login given to update credentials on Mailgun', caller) unless login
|
126
134
|
@client.put("domains/#{domain}/credentials/#{login}", options).to_h
|
@@ -133,6 +141,7 @@ module Mailgun
|
|
133
141
|
#
|
134
142
|
# Returns [Hash] with message and spec keys
|
135
143
|
def delete_smtp_credentials(domain, login)
|
144
|
+
warn('WARN: Client api version must be v3') unless @client.api_version == 'v3'
|
136
145
|
fail(ParameterError, 'No domain given to delete credentials on Mailgun', caller) unless domain
|
137
146
|
fail(ParameterError, 'No login given to delete credentials on Mailgun', caller) unless login
|
138
147
|
@client.delete("domains/#{domain}/credentials/#{login}").to_h
|
@@ -144,6 +153,7 @@ module Mailgun
|
|
144
153
|
#
|
145
154
|
# Returns [Hash] Information on the delivery connection settings
|
146
155
|
def get_domain_connection_settings(domain)
|
156
|
+
warn('WARN: Client api version must be v3') unless @client.api_version == 'v3'
|
147
157
|
fail(ParameterError, 'No domain given to retrieve connections on Mailgun', caller) unless domain
|
148
158
|
@client.get("domains/#{domain}/connection").to_h
|
149
159
|
end
|
@@ -158,6 +168,7 @@ module Mailgun
|
|
158
168
|
#
|
159
169
|
# Returns [Hash] Information on the delivery connection settings
|
160
170
|
def update_domain_connection_settings(domain, options = {})
|
171
|
+
warn('WARN: Client api version must be v3') unless @client.api_version == 'v3'
|
161
172
|
fail(ParameterError, 'No domain given to update connections on Mailgun', caller) unless domain
|
162
173
|
@client.put("domains/#{domain}/connection", options).to_h
|
163
174
|
end
|
@@ -168,6 +179,7 @@ module Mailgun
|
|
168
179
|
#
|
169
180
|
# Returns [Hash] Information on the tracking settings
|
170
181
|
def get_domain_tracking_settings(domain)
|
182
|
+
warn('WARN: Client api version must be v3') unless @client.api_version == 'v3'
|
171
183
|
fail(ParameterError, 'No domain given to retrieve tracking settings on Mailgun', caller) unless domain
|
172
184
|
@client.get("domains/#{domain}/tracking").to_h
|
173
185
|
end
|
@@ -181,6 +193,7 @@ module Mailgun
|
|
181
193
|
#
|
182
194
|
# Returns [Hash] Information on the tracking open settings
|
183
195
|
def update_domain_tracking_open_settings(domain, options = {})
|
196
|
+
warn('WARN: Client api version must be v3') unless @client.api_version == 'v3'
|
184
197
|
fail(ParameterError, 'No domain given to update tracking settings on Mailgun', caller) unless domain
|
185
198
|
@client.put("domains/#{domain}/tracking/open", options).to_h
|
186
199
|
end
|
@@ -193,6 +206,7 @@ module Mailgun
|
|
193
206
|
#
|
194
207
|
# Returns [Hash] Information on the tracking click settings
|
195
208
|
def update_domain_tracking_click_settings(domain, options = {})
|
209
|
+
warn('WARN: Client api version must be v3') unless @client.api_version == 'v3'
|
196
210
|
fail(ParameterError, 'No domain given to update tracking settings on Mailgun', caller) unless domain
|
197
211
|
@client.put("domains/#{domain}/tracking/click", options).to_h
|
198
212
|
end
|
@@ -207,6 +221,7 @@ module Mailgun
|
|
207
221
|
#
|
208
222
|
# Returns [Hash] Information on the tracking unsubscribe settings
|
209
223
|
def update_domain_tracking_unsubscribe_settings(domain, options = {})
|
224
|
+
warn('WARN: Client api version must be v3') unless @client.api_version == 'v3'
|
210
225
|
fail(ParameterError, 'No domain given to update tracking settings on Mailgun', caller) unless domain
|
211
226
|
@client.put("domains/#{domain}/tracking/unsubscribe", options).to_h
|
212
227
|
end
|
@@ -220,6 +235,7 @@ module Mailgun
|
|
220
235
|
#
|
221
236
|
# Returns [Hash] Information on the DKIM authority
|
222
237
|
def update_domain_dkim_authority(domain, options = {})
|
238
|
+
warn('WARN: Client api version must be v3') unless @client.api_version == 'v3'
|
223
239
|
fail(ParameterError, 'No domain given to update tracking settings on Mailgun', caller) unless domain
|
224
240
|
@client.put("domains/#{domain}/dkim_authority", options).to_h
|
225
241
|
end
|
@@ -232,6 +248,7 @@ module Mailgun
|
|
232
248
|
#
|
233
249
|
# Returns [Hash] with message key
|
234
250
|
def update_domain_dkim_selector(domain, options = {})
|
251
|
+
warn('WARN: Client api version must be v3') unless @client.api_version == 'v3'
|
235
252
|
fail(ParameterError, 'No domain given to update tracking settings on Mailgun', caller) unless domain
|
236
253
|
@client.put("domains/#{domain}/dkim_selector", options).to_h
|
237
254
|
end
|
@@ -244,6 +261,7 @@ module Mailgun
|
|
244
261
|
#
|
245
262
|
# Returns [Hash] with message key
|
246
263
|
def update_domain_web_prefix(domain, options = {})
|
264
|
+
warn('WARN: Client api version must be v3') unless @client.api_version == 'v3'
|
247
265
|
fail(ParameterError, 'No domain given to update tracking settings on Mailgun', caller) unless domain
|
248
266
|
@client.put("domains/#{domain}/web_prefix", options).to_h
|
249
267
|
end
|
@@ -323,6 +341,7 @@ module Mailgun
|
|
323
341
|
#
|
324
342
|
# Returns [Array] A list of domains (hash)
|
325
343
|
def get_domain_stats(domain, options = {})
|
344
|
+
warn('WARN: Client api version must be v3') unless @client.api_version == 'v3'
|
326
345
|
fail(ParameterError, 'No domain given to list stats on Mailgun', caller) unless domain
|
327
346
|
@client.get("#{domain}/stats/total", options).to_h
|
328
347
|
end
|
@@ -29,7 +29,7 @@ module Mailgun
|
|
29
29
|
# params - a Hash of query options and/or filters.
|
30
30
|
#
|
31
31
|
# Returns a Mailgun::Response object.
|
32
|
-
def get(params =
|
32
|
+
def get(params = {})
|
33
33
|
self.next(params)
|
34
34
|
end
|
35
35
|
|
@@ -40,7 +40,7 @@ module Mailgun
|
|
40
40
|
# params - a Hash of query options and/or filters.
|
41
41
|
#
|
42
42
|
# Returns a Mailgun::Response object.
|
43
|
-
def next(params =
|
43
|
+
def next(params = {})
|
44
44
|
get_events(params, @paging_next)
|
45
45
|
end
|
46
46
|
|
@@ -51,7 +51,7 @@ module Mailgun
|
|
51
51
|
# params - a Hash of query options and/or filters.
|
52
52
|
#
|
53
53
|
# Returns Mailgun::Response object.
|
54
|
-
def previous(params =
|
54
|
+
def previous(params = {})
|
55
55
|
get_events(params, @paging_previous)
|
56
56
|
end
|
57
57
|
|
@@ -75,7 +75,7 @@ module Mailgun
|
|
75
75
|
# paging - the URL key used for previous/next requests
|
76
76
|
#
|
77
77
|
# Returns a Mailgun.Response object.
|
78
|
-
def get_events(params =
|
78
|
+
def get_events(params = {}, paging = nil)
|
79
79
|
response = @client.get(construct_url(paging), params)
|
80
80
|
extract_paging(response)
|
81
81
|
response
|
data/lib/mailgun/version.rb
CHANGED
data/mailgun.gemspec
CHANGED
@@ -30,12 +30,12 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_development_dependency 'bundler', '>= 1.16.2'
|
31
31
|
spec.add_development_dependency 'rspec', '~> 3.8.0'
|
32
32
|
spec.add_development_dependency 'rake', '~> 12.3.2'
|
33
|
-
spec.add_development_dependency 'mime-types'
|
34
33
|
spec.add_development_dependency 'webmock', '~> 3.7'
|
35
34
|
spec.add_development_dependency 'pry', '~> 0.11.3'
|
36
35
|
spec.add_development_dependency 'vcr', '~> 3.0.3'
|
37
36
|
spec.add_development_dependency 'simplecov', '~> 0.16.1'
|
38
37
|
spec.add_development_dependency 'rails'
|
38
|
+
spec.add_dependency 'mime-types'
|
39
39
|
spec.add_dependency 'faraday', "~> 2.1"
|
40
40
|
|
41
41
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
require 'mailgun'
|
3
3
|
|
4
|
-
vcr_opts = { :cassette_name => "routes" }
|
4
|
+
vcr_opts = { :cassette_name => "routes", :match_requests_on => [:uri, :method, :body] }
|
5
5
|
|
6
6
|
describe 'For the Routes endpoint', order: :defined, vcr: vcr_opts do
|
7
7
|
before(:all) do
|
@@ -25,6 +25,22 @@ describe 'For the Routes endpoint', order: :defined, vcr: vcr_opts do
|
|
25
25
|
expect(result.body["route"]["priority"]).to eq(10)
|
26
26
|
end
|
27
27
|
|
28
|
+
it 'creates a route with multiple actions' do
|
29
|
+
result = @mg_obj.post("routes", { priority: 10,
|
30
|
+
description: 'Integration Test Route',
|
31
|
+
expression: "match_recipient(\"#{@forward_to}\")",
|
32
|
+
action: ["forward(\"#{@recipient}\")", "stop()"] })
|
33
|
+
|
34
|
+
result.to_h!
|
35
|
+
expect(result.body["message"]).to eq("Route has been created")
|
36
|
+
expect(result.body["route"]["description"]).to eq("Integration Test Route")
|
37
|
+
expect(result.body["route"]["actions"].count).to eq 2
|
38
|
+
expect(result.body["route"]["actions"][0]).to include("forward(\"#{@recipient}\")")
|
39
|
+
expect(result.body["route"]["actions"][1]).to include("stop()")
|
40
|
+
expect(result.body["route"]["expression"]).to include("match_recipient(\"#{@forward_to}\")")
|
41
|
+
expect(result.body["route"]["priority"]).to eq(10)
|
42
|
+
end
|
43
|
+
|
28
44
|
it 'gets a list of all routes.' do
|
29
45
|
result = @mg_obj.get("routes", {:limit => 50})
|
30
46
|
|
data/vcr_cassettes/bounces.yml
CHANGED
@@ -172,4 +172,213 @@ http_interactions:
|
|
172
172
|
address has been removed"}'
|
173
173
|
http_version:
|
174
174
|
recorded_at: Fri, 08 Jan 2016 20:33:30 GMT
|
175
|
-
|
175
|
+
- request:
|
176
|
+
method: post
|
177
|
+
uri: https://api.mailgun.net/v3/DOMAIN.TEST/bounces
|
178
|
+
body:
|
179
|
+
encoding: UTF-8
|
180
|
+
string: address=integration-test%2Bemail%40DOMAIN.TEST&code=550&error=Integration+Test
|
181
|
+
headers:
|
182
|
+
User-Agent:
|
183
|
+
- mailgun-sdk-ruby/1.3.0
|
184
|
+
Accept:
|
185
|
+
- "*/*"
|
186
|
+
Authorization:
|
187
|
+
- Basic xxx==
|
188
|
+
Content-Type:
|
189
|
+
- application/x-www-form-urlencoded
|
190
|
+
Accept-Encoding:
|
191
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
192
|
+
response:
|
193
|
+
status:
|
194
|
+
code: 200
|
195
|
+
message: OK
|
196
|
+
headers:
|
197
|
+
Access-Control-Allow-Credentials:
|
198
|
+
- 'true'
|
199
|
+
Access-Control-Allow-Origin:
|
200
|
+
- "*"
|
201
|
+
Cache-Control:
|
202
|
+
- no-store
|
203
|
+
Content-Length:
|
204
|
+
- '145'
|
205
|
+
Content-Type:
|
206
|
+
- application/json; charset=utf-8
|
207
|
+
Date:
|
208
|
+
- Sun, 26 Jan 2025 07:29:04 GMT
|
209
|
+
Strict-Transport-Security:
|
210
|
+
- max-age=63072000; includeSubDomains
|
211
|
+
X-Mailgun-Key-Id:
|
212
|
+
- 90b59dea-f2d12a53
|
213
|
+
X-Request-Limit:
|
214
|
+
- '2500'
|
215
|
+
X-Request-Remaining:
|
216
|
+
- '2499'
|
217
|
+
X-Request-Reset:
|
218
|
+
- '1737876559178'
|
219
|
+
X-Xss-Protection:
|
220
|
+
- 1; mode=block
|
221
|
+
body:
|
222
|
+
encoding: UTF-8
|
223
|
+
string: '{"message":"Address has been added to the bounces table","address":"integration-test+email@DOMAIN.TEST"}
|
224
|
+
|
225
|
+
'
|
226
|
+
http_version:
|
227
|
+
recorded_at: Sun, 26 Jan 2025 07:29:04 GMT
|
228
|
+
- request:
|
229
|
+
method: get
|
230
|
+
uri: https://api.mailgun.net/v3/DOMAIN.TEST/bounces/integration-test+email@DOMAIN.TEST
|
231
|
+
body:
|
232
|
+
encoding: US-ASCII
|
233
|
+
string: ''
|
234
|
+
headers:
|
235
|
+
User-Agent:
|
236
|
+
- mailgun-sdk-ruby/1.3.0
|
237
|
+
Accept:
|
238
|
+
- "*/*"
|
239
|
+
Authorization:
|
240
|
+
- Basic xxx==
|
241
|
+
Accept-Encoding:
|
242
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
243
|
+
response:
|
244
|
+
status:
|
245
|
+
code: 200
|
246
|
+
message: OK
|
247
|
+
headers:
|
248
|
+
Access-Control-Allow-Credentials:
|
249
|
+
- 'true'
|
250
|
+
Access-Control-Allow-Origin:
|
251
|
+
- "*"
|
252
|
+
Cache-Control:
|
253
|
+
- no-store
|
254
|
+
Content-Length:
|
255
|
+
- '174'
|
256
|
+
Content-Type:
|
257
|
+
- application/json; charset=utf-8
|
258
|
+
Date:
|
259
|
+
- Sun, 26 Jan 2025 07:29:04 GMT
|
260
|
+
Strict-Transport-Security:
|
261
|
+
- max-age=63072000; includeSubDomains
|
262
|
+
X-Mailgun-Key-Id:
|
263
|
+
- 90b59dea-f2d12a53
|
264
|
+
X-Request-Limit:
|
265
|
+
- '2500'
|
266
|
+
X-Request-Remaining:
|
267
|
+
- '2498'
|
268
|
+
X-Request-Reset:
|
269
|
+
- '1737876559178'
|
270
|
+
X-Xss-Protection:
|
271
|
+
- 1; mode=block
|
272
|
+
body:
|
273
|
+
encoding: UTF-8
|
274
|
+
string: '{"address":"integration-test+email@DOMAIN.TEST","code":"550","error":"Integration
|
275
|
+
Test","created_at":"Sun, 26 Jan 2025 07:29:04 UTC"}
|
276
|
+
|
277
|
+
'
|
278
|
+
http_version:
|
279
|
+
recorded_at: Sun, 26 Jan 2025 07:29:04 GMT
|
280
|
+
- request:
|
281
|
+
method: get
|
282
|
+
uri: https://api.mailgun.net/v3/DOMAIN.TEST/bounces
|
283
|
+
body:
|
284
|
+
encoding: US-ASCII
|
285
|
+
string: ''
|
286
|
+
headers:
|
287
|
+
User-Agent:
|
288
|
+
- mailgun-sdk-ruby/1.3.0
|
289
|
+
Accept:
|
290
|
+
- "*/*"
|
291
|
+
Authorization:
|
292
|
+
- Basic xxx==
|
293
|
+
Accept-Encoding:
|
294
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
295
|
+
response:
|
296
|
+
status:
|
297
|
+
code: 200
|
298
|
+
message: OK
|
299
|
+
headers:
|
300
|
+
Access-Control-Allow-Credentials:
|
301
|
+
- 'true'
|
302
|
+
Access-Control-Allow-Origin:
|
303
|
+
- "*"
|
304
|
+
Cache-Control:
|
305
|
+
- no-store
|
306
|
+
Content-Length:
|
307
|
+
- '858'
|
308
|
+
Content-Type:
|
309
|
+
- application/json; charset=utf-8
|
310
|
+
Date:
|
311
|
+
- Sun, 26 Jan 2025 07:29:05 GMT
|
312
|
+
Strict-Transport-Security:
|
313
|
+
- max-age=63072000; includeSubDomains
|
314
|
+
X-Mailgun-Key-Id:
|
315
|
+
- 90b59dea-f2d12a53
|
316
|
+
X-Request-Limit:
|
317
|
+
- '2500'
|
318
|
+
X-Request-Remaining:
|
319
|
+
- '2497'
|
320
|
+
X-Request-Reset:
|
321
|
+
- '1737876559178'
|
322
|
+
X-Xss-Protection:
|
323
|
+
- 1; mode=block
|
324
|
+
body:
|
325
|
+
encoding: UTF-8
|
326
|
+
string: '{"items":[{"address":"integration-test+email@DOMAIN.TEST","code":"550","error":"Integration
|
327
|
+
Test","created_at":"Sun, 26 Jan 2025 07:29:04 UTC"}],"paging":{"first":"https://api.mailgun.net/v3/DOMAIN.TEST/bounces?limit=100&term=","last":"https://api.mailgun.net/v3/DOMAIN.TEST/bounces?page=last&limit=100&term=","next":"https://api.mailgun.net/v3/DOMAIN.TEST/bounces?page=next&address=integration-test%2Bemail%40DOMAIN.TEST&limit=100&term=","previous":"https://api.mailgun.net/v3/DOMAIN.TEST/bounces?page=previous&address=integration-test%2Bemail%40DOMAIN.TEST&limit=100&term="}}
|
328
|
+
|
329
|
+
'
|
330
|
+
http_version:
|
331
|
+
recorded_at: Sun, 26 Jan 2025 07:29:05 GMT
|
332
|
+
- request:
|
333
|
+
method: delete
|
334
|
+
uri: https://api.mailgun.net/v3/DOMAIN.TEST/bounces/integration-test+email@DOMAIN.TEST
|
335
|
+
body:
|
336
|
+
encoding: US-ASCII
|
337
|
+
string: ''
|
338
|
+
headers:
|
339
|
+
User-Agent:
|
340
|
+
- mailgun-sdk-ruby/1.3.0
|
341
|
+
Accept:
|
342
|
+
- "*/*"
|
343
|
+
Authorization:
|
344
|
+
- Basic xxx==
|
345
|
+
Accept-Encoding:
|
346
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
347
|
+
response:
|
348
|
+
status:
|
349
|
+
code: 200
|
350
|
+
message: OK
|
351
|
+
headers:
|
352
|
+
Access-Control-Allow-Credentials:
|
353
|
+
- 'true'
|
354
|
+
Access-Control-Allow-Origin:
|
355
|
+
- "*"
|
356
|
+
Cache-Control:
|
357
|
+
- no-store
|
358
|
+
Content-Length:
|
359
|
+
- '134'
|
360
|
+
Content-Type:
|
361
|
+
- application/json; charset=utf-8
|
362
|
+
Date:
|
363
|
+
- Sun, 26 Jan 2025 07:29:06 GMT
|
364
|
+
Strict-Transport-Security:
|
365
|
+
- max-age=63072000; includeSubDomains
|
366
|
+
X-Mailgun-Key-Id:
|
367
|
+
- 90b59dea-f2d12a53
|
368
|
+
X-Request-Limit:
|
369
|
+
- '2500'
|
370
|
+
X-Request-Remaining:
|
371
|
+
- '2496'
|
372
|
+
X-Request-Reset:
|
373
|
+
- '1737876559178'
|
374
|
+
X-Xss-Protection:
|
375
|
+
- 1; mode=block
|
376
|
+
body:
|
377
|
+
encoding: UTF-8
|
378
|
+
string: '{"address":"integration-test+email@DOMAIN.TEST","message":"Bounced
|
379
|
+
address has been removed"}
|
380
|
+
|
381
|
+
'
|
382
|
+
http_version:
|
383
|
+
recorded_at: Sun, 26 Jan 2025 07:29:06 GMT
|
384
|
+
recorded_with: VCR 3.0.3
|