mailgun-ruby 1.1.0 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/.ruby-env.yml.example +1 -1
- data/.travis.yml +23 -7
- data/Gemfile +2 -0
- data/README.md +79 -18
- data/{Domains.md → docs/Domains.md} +18 -0
- data/{Events.md → docs/Events.md} +0 -0
- data/{MessageBuilder.md → docs/MessageBuilder.md} +32 -13
- data/{Messages.md → docs/Messages.md} +3 -3
- data/{OptInHandler.md → docs/OptInHandler.md} +0 -0
- data/{Snippets.md → docs/Snippets.md} +21 -2
- data/docs/Suppressions.md +82 -0
- data/{Webhooks.md → docs/Webhooks.md} +1 -1
- data/docs/railgun/Overview.md +11 -0
- data/docs/railgun/Parameters.md +83 -0
- data/lib/mailgun/address.rb +48 -0
- data/lib/mailgun/client.rb +85 -8
- data/lib/mailgun/events/events.rb +40 -12
- data/lib/mailgun/exceptions/exceptions.rb +21 -7
- data/lib/mailgun/lists/opt_in_handler.rb +0 -1
- data/lib/mailgun/messages/batch_message.rb +3 -2
- data/lib/mailgun/messages/message_builder.rb +139 -30
- data/lib/mailgun/response.rb +7 -0
- data/lib/mailgun/suppressions.rb +273 -0
- data/lib/mailgun/version.rb +1 -1
- data/lib/mailgun/webhooks/webhooks.rb +1 -1
- data/lib/mailgun-ruby.rb +2 -0
- data/lib/mailgun.rb +1 -0
- data/lib/railgun/attachment.rb +56 -0
- data/lib/railgun/errors.rb +27 -0
- data/lib/railgun/mailer.rb +253 -0
- data/lib/railgun/message.rb +18 -0
- data/lib/railgun/railtie.rb +10 -0
- data/lib/railgun.rb +8 -0
- data/mailgun.gemspec +12 -13
- data/spec/integration/email_validation_spec.rb +57 -15
- data/spec/integration/events_spec.rb +9 -1
- data/spec/integration/mailer_spec.rb +67 -0
- data/spec/integration/mailgun_spec.rb +51 -1
- data/spec/integration/suppressions_spec.rb +142 -0
- data/spec/spec_helper.rb +3 -1
- data/spec/unit/connection/test_client.rb +16 -0
- data/spec/unit/events/events_spec.rb +36 -2
- data/spec/unit/mailgun_spec.rb +32 -10
- data/spec/unit/messages/batch_message_spec.rb +56 -40
- data/spec/unit/messages/message_builder_spec.rb +267 -81
- data/spec/unit/messages/sample_data/unknown.type +0 -0
- data/spec/unit/railgun/content_type_spec.rb +71 -0
- data/spec/unit/railgun/mailer_spec.rb +388 -0
- data/vcr_cassettes/email_validation.yml +136 -25
- data/vcr_cassettes/events.yml +48 -1
- data/vcr_cassettes/exceptions.yml +45 -0
- data/vcr_cassettes/mailer_invalid_domain.yml +109 -0
- data/vcr_cassettes/message_deliver.yml +149 -0
- data/vcr_cassettes/suppressions.yml +727 -0
- metadata +65 -40
@@ -0,0 +1,727 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/bounces
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '[{"address":"test4@example.info","code":"500","error":"integration
|
9
|
+
testing"},{"address":"test3@example.net","code":"500","error":"integration
|
10
|
+
testing"},{"address":"test2@example.org","code":"500","error":"integration
|
11
|
+
testing"},{"address":"test1@example.com","code":"500","error":"integration
|
12
|
+
testing"}]'
|
13
|
+
headers:
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip, deflate
|
18
|
+
User-Agent:
|
19
|
+
- rest-client/2.0.0 (linux-gnu x86_64) ruby/2.3.1p112
|
20
|
+
Content-Type:
|
21
|
+
- application/json
|
22
|
+
Content-Length:
|
23
|
+
- '302'
|
24
|
+
Host:
|
25
|
+
- api.mailgun.net
|
26
|
+
response:
|
27
|
+
status:
|
28
|
+
code: 200
|
29
|
+
message: OK
|
30
|
+
headers:
|
31
|
+
Server:
|
32
|
+
- nginx
|
33
|
+
Date:
|
34
|
+
- Wed, 30 Nov 2016 20:51:44 GMT
|
35
|
+
Content-Type:
|
36
|
+
- application/json; charset=utf-8
|
37
|
+
Content-Length:
|
38
|
+
- '62'
|
39
|
+
Connection:
|
40
|
+
- keep-alive
|
41
|
+
Access-Control-Allow-Origin:
|
42
|
+
- "*"
|
43
|
+
Access-Control-Max-Age:
|
44
|
+
- '600'
|
45
|
+
Access-Control-Allow-Methods:
|
46
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
47
|
+
Access-Control-Allow-Headers:
|
48
|
+
- Content-Type, x-requested-with
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"message":"4 addresses have been added to the bounces table"}'
|
52
|
+
http_version:
|
53
|
+
recorded_at: Wed, 30 Nov 2016 20:53:49 GMT
|
54
|
+
- request:
|
55
|
+
method: delete
|
56
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/bounces/test1@example.com
|
57
|
+
body:
|
58
|
+
encoding: US-ASCII
|
59
|
+
string: ''
|
60
|
+
headers:
|
61
|
+
Accept:
|
62
|
+
- "*/*"
|
63
|
+
Accept-Encoding:
|
64
|
+
- gzip, deflate
|
65
|
+
User-Agent:
|
66
|
+
- rest-client/2.0.0 (linux-gnu x86_64) ruby/2.3.1p112
|
67
|
+
Host:
|
68
|
+
- api.mailgun.net
|
69
|
+
response:
|
70
|
+
status:
|
71
|
+
code: 200
|
72
|
+
message: OK
|
73
|
+
headers:
|
74
|
+
Server:
|
75
|
+
- nginx
|
76
|
+
Date:
|
77
|
+
- Wed, 30 Nov 2016 20:51:44 GMT
|
78
|
+
Content-Type:
|
79
|
+
- application/json; charset=utf-8
|
80
|
+
Content-Length:
|
81
|
+
- '76'
|
82
|
+
Connection:
|
83
|
+
- keep-alive
|
84
|
+
Access-Control-Allow-Origin:
|
85
|
+
- "*"
|
86
|
+
Access-Control-Max-Age:
|
87
|
+
- '600'
|
88
|
+
Access-Control-Allow-Methods:
|
89
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
90
|
+
Access-Control-Allow-Headers:
|
91
|
+
- Content-Type, x-requested-with
|
92
|
+
body:
|
93
|
+
encoding: UTF-8
|
94
|
+
string: '{"address":"test1@example.com","message":"Bounced address has been
|
95
|
+
removed"}'
|
96
|
+
http_version:
|
97
|
+
recorded_at: Wed, 30 Nov 2016 20:53:49 GMT
|
98
|
+
- request:
|
99
|
+
method: delete
|
100
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/bounces/test2@example.org
|
101
|
+
body:
|
102
|
+
encoding: US-ASCII
|
103
|
+
string: ''
|
104
|
+
headers:
|
105
|
+
Accept:
|
106
|
+
- "*/*"
|
107
|
+
Accept-Encoding:
|
108
|
+
- gzip, deflate
|
109
|
+
User-Agent:
|
110
|
+
- rest-client/2.0.0 (linux-gnu x86_64) ruby/2.3.1p112
|
111
|
+
Host:
|
112
|
+
- api.mailgun.net
|
113
|
+
response:
|
114
|
+
status:
|
115
|
+
code: 200
|
116
|
+
message: OK
|
117
|
+
headers:
|
118
|
+
Server:
|
119
|
+
- nginx
|
120
|
+
Date:
|
121
|
+
- Wed, 30 Nov 2016 20:51:44 GMT
|
122
|
+
Content-Type:
|
123
|
+
- application/json; charset=utf-8
|
124
|
+
Content-Length:
|
125
|
+
- '76'
|
126
|
+
Connection:
|
127
|
+
- keep-alive
|
128
|
+
Access-Control-Allow-Origin:
|
129
|
+
- "*"
|
130
|
+
Access-Control-Max-Age:
|
131
|
+
- '600'
|
132
|
+
Access-Control-Allow-Methods:
|
133
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
134
|
+
Access-Control-Allow-Headers:
|
135
|
+
- Content-Type, x-requested-with
|
136
|
+
body:
|
137
|
+
encoding: UTF-8
|
138
|
+
string: '{"address":"test2@example.org","message":"Bounced address has been
|
139
|
+
removed"}'
|
140
|
+
http_version:
|
141
|
+
recorded_at: Wed, 30 Nov 2016 20:53:50 GMT
|
142
|
+
- request:
|
143
|
+
method: delete
|
144
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/bounces/test3@example.net
|
145
|
+
body:
|
146
|
+
encoding: US-ASCII
|
147
|
+
string: ''
|
148
|
+
headers:
|
149
|
+
Accept:
|
150
|
+
- "*/*"
|
151
|
+
Accept-Encoding:
|
152
|
+
- gzip, deflate
|
153
|
+
User-Agent:
|
154
|
+
- rest-client/2.0.0 (linux-gnu x86_64) ruby/2.3.1p112
|
155
|
+
Host:
|
156
|
+
- api.mailgun.net
|
157
|
+
response:
|
158
|
+
status:
|
159
|
+
code: 200
|
160
|
+
message: OK
|
161
|
+
headers:
|
162
|
+
Server:
|
163
|
+
- nginx
|
164
|
+
Date:
|
165
|
+
- Wed, 30 Nov 2016 20:51:45 GMT
|
166
|
+
Content-Type:
|
167
|
+
- application/json; charset=utf-8
|
168
|
+
Content-Length:
|
169
|
+
- '76'
|
170
|
+
Connection:
|
171
|
+
- keep-alive
|
172
|
+
Access-Control-Allow-Origin:
|
173
|
+
- "*"
|
174
|
+
Access-Control-Max-Age:
|
175
|
+
- '600'
|
176
|
+
Access-Control-Allow-Methods:
|
177
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
178
|
+
Access-Control-Allow-Headers:
|
179
|
+
- Content-Type, x-requested-with
|
180
|
+
body:
|
181
|
+
encoding: UTF-8
|
182
|
+
string: '{"address":"test3@example.net","message":"Bounced address has been
|
183
|
+
removed"}'
|
184
|
+
http_version:
|
185
|
+
recorded_at: Wed, 30 Nov 2016 20:53:50 GMT
|
186
|
+
- request:
|
187
|
+
method: delete
|
188
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/bounces/test4@example.info
|
189
|
+
body:
|
190
|
+
encoding: US-ASCII
|
191
|
+
string: ''
|
192
|
+
headers:
|
193
|
+
Accept:
|
194
|
+
- "*/*"
|
195
|
+
Accept-Encoding:
|
196
|
+
- gzip, deflate
|
197
|
+
User-Agent:
|
198
|
+
- rest-client/2.0.0 (linux-gnu x86_64) ruby/2.3.1p112
|
199
|
+
Host:
|
200
|
+
- api.mailgun.net
|
201
|
+
response:
|
202
|
+
status:
|
203
|
+
code: 200
|
204
|
+
message: OK
|
205
|
+
headers:
|
206
|
+
Server:
|
207
|
+
- nginx
|
208
|
+
Date:
|
209
|
+
- Wed, 30 Nov 2016 20:51:45 GMT
|
210
|
+
Content-Type:
|
211
|
+
- application/json; charset=utf-8
|
212
|
+
Content-Length:
|
213
|
+
- '77'
|
214
|
+
Connection:
|
215
|
+
- keep-alive
|
216
|
+
Access-Control-Allow-Origin:
|
217
|
+
- "*"
|
218
|
+
Access-Control-Max-Age:
|
219
|
+
- '600'
|
220
|
+
Access-Control-Allow-Methods:
|
221
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
222
|
+
Access-Control-Allow-Headers:
|
223
|
+
- Content-Type, x-requested-with
|
224
|
+
body:
|
225
|
+
encoding: UTF-8
|
226
|
+
string: '{"address":"test4@example.info","message":"Bounced address has been
|
227
|
+
removed"}'
|
228
|
+
http_version:
|
229
|
+
recorded_at: Wed, 30 Nov 2016 20:53:50 GMT
|
230
|
+
- request:
|
231
|
+
method: post
|
232
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/unsubscribes
|
233
|
+
body:
|
234
|
+
encoding: UTF-8
|
235
|
+
string: '[{"address":"test4@example.info","tag":"Tools"},{"address":"test3@example.net","tag":"Garden
|
236
|
+
& Automotive"},{"address":"test2@example.org","tag":"Toys, Jewelry & Kids"},{"address":"test1@example.com","tag":"Outdoors,
|
237
|
+
Books & Shoes"}]'
|
238
|
+
headers:
|
239
|
+
Accept:
|
240
|
+
- "*/*"
|
241
|
+
Accept-Encoding:
|
242
|
+
- gzip, deflate
|
243
|
+
User-Agent:
|
244
|
+
- rest-client/2.0.0 (linux-gnu x86_64) ruby/2.3.1p112
|
245
|
+
Content-Type:
|
246
|
+
- application/json
|
247
|
+
Content-Length:
|
248
|
+
- '233'
|
249
|
+
Host:
|
250
|
+
- api.mailgun.net
|
251
|
+
response:
|
252
|
+
status:
|
253
|
+
code: 200
|
254
|
+
message: OK
|
255
|
+
headers:
|
256
|
+
Server:
|
257
|
+
- nginx
|
258
|
+
Date:
|
259
|
+
- Wed, 30 Nov 2016 20:51:45 GMT
|
260
|
+
Content-Type:
|
261
|
+
- application/json; charset=utf-8
|
262
|
+
Content-Length:
|
263
|
+
- '67'
|
264
|
+
Connection:
|
265
|
+
- keep-alive
|
266
|
+
Access-Control-Allow-Origin:
|
267
|
+
- "*"
|
268
|
+
Access-Control-Max-Age:
|
269
|
+
- '600'
|
270
|
+
Access-Control-Allow-Methods:
|
271
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
272
|
+
Access-Control-Allow-Headers:
|
273
|
+
- Content-Type, x-requested-with
|
274
|
+
body:
|
275
|
+
encoding: UTF-8
|
276
|
+
string: '{"message":"4 addresses have been added to the unsubscribes table"}'
|
277
|
+
http_version:
|
278
|
+
recorded_at: Wed, 30 Nov 2016 20:53:51 GMT
|
279
|
+
- request:
|
280
|
+
method: delete
|
281
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/unsubscribes/test1@example.com
|
282
|
+
body:
|
283
|
+
encoding: US-ASCII
|
284
|
+
string: ''
|
285
|
+
headers:
|
286
|
+
Accept:
|
287
|
+
- "*/*"
|
288
|
+
Accept-Encoding:
|
289
|
+
- gzip, deflate
|
290
|
+
User-Agent:
|
291
|
+
- rest-client/2.0.0 (linux-gnu x86_64) ruby/2.3.1p112
|
292
|
+
Host:
|
293
|
+
- api.mailgun.net
|
294
|
+
response:
|
295
|
+
status:
|
296
|
+
code: 200
|
297
|
+
message: OK
|
298
|
+
headers:
|
299
|
+
Server:
|
300
|
+
- nginx
|
301
|
+
Date:
|
302
|
+
- Wed, 30 Nov 2016 20:51:46 GMT
|
303
|
+
Content-Type:
|
304
|
+
- application/json; charset=utf-8
|
305
|
+
Content-Length:
|
306
|
+
- '78'
|
307
|
+
Connection:
|
308
|
+
- keep-alive
|
309
|
+
Access-Control-Allow-Origin:
|
310
|
+
- "*"
|
311
|
+
Access-Control-Max-Age:
|
312
|
+
- '600'
|
313
|
+
Access-Control-Allow-Methods:
|
314
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
315
|
+
Access-Control-Allow-Headers:
|
316
|
+
- Content-Type, x-requested-with
|
317
|
+
body:
|
318
|
+
encoding: UTF-8
|
319
|
+
string: '{"address":"test1@example.com","message":"Unsubscribe event has been
|
320
|
+
removed"}'
|
321
|
+
http_version:
|
322
|
+
recorded_at: Wed, 30 Nov 2016 20:53:51 GMT
|
323
|
+
- request:
|
324
|
+
method: delete
|
325
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/unsubscribes/test2@example.org
|
326
|
+
body:
|
327
|
+
encoding: US-ASCII
|
328
|
+
string: ''
|
329
|
+
headers:
|
330
|
+
Accept:
|
331
|
+
- "*/*"
|
332
|
+
Accept-Encoding:
|
333
|
+
- gzip, deflate
|
334
|
+
User-Agent:
|
335
|
+
- rest-client/2.0.0 (linux-gnu x86_64) ruby/2.3.1p112
|
336
|
+
Host:
|
337
|
+
- api.mailgun.net
|
338
|
+
response:
|
339
|
+
status:
|
340
|
+
code: 200
|
341
|
+
message: OK
|
342
|
+
headers:
|
343
|
+
Server:
|
344
|
+
- nginx
|
345
|
+
Date:
|
346
|
+
- Wed, 30 Nov 2016 20:51:46 GMT
|
347
|
+
Content-Type:
|
348
|
+
- application/json; charset=utf-8
|
349
|
+
Content-Length:
|
350
|
+
- '78'
|
351
|
+
Connection:
|
352
|
+
- keep-alive
|
353
|
+
Access-Control-Allow-Origin:
|
354
|
+
- "*"
|
355
|
+
Access-Control-Max-Age:
|
356
|
+
- '600'
|
357
|
+
Access-Control-Allow-Methods:
|
358
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
359
|
+
Access-Control-Allow-Headers:
|
360
|
+
- Content-Type, x-requested-with
|
361
|
+
body:
|
362
|
+
encoding: UTF-8
|
363
|
+
string: '{"address":"test2@example.org","message":"Unsubscribe event has been
|
364
|
+
removed"}'
|
365
|
+
http_version:
|
366
|
+
recorded_at: Wed, 30 Nov 2016 20:53:51 GMT
|
367
|
+
- request:
|
368
|
+
method: delete
|
369
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/unsubscribes/test3@example.net
|
370
|
+
body:
|
371
|
+
encoding: US-ASCII
|
372
|
+
string: ''
|
373
|
+
headers:
|
374
|
+
Accept:
|
375
|
+
- "*/*"
|
376
|
+
Accept-Encoding:
|
377
|
+
- gzip, deflate
|
378
|
+
User-Agent:
|
379
|
+
- rest-client/2.0.0 (linux-gnu x86_64) ruby/2.3.1p112
|
380
|
+
Host:
|
381
|
+
- api.mailgun.net
|
382
|
+
response:
|
383
|
+
status:
|
384
|
+
code: 200
|
385
|
+
message: OK
|
386
|
+
headers:
|
387
|
+
Server:
|
388
|
+
- nginx
|
389
|
+
Date:
|
390
|
+
- Wed, 30 Nov 2016 20:51:46 GMT
|
391
|
+
Content-Type:
|
392
|
+
- application/json; charset=utf-8
|
393
|
+
Content-Length:
|
394
|
+
- '78'
|
395
|
+
Connection:
|
396
|
+
- keep-alive
|
397
|
+
Access-Control-Allow-Origin:
|
398
|
+
- "*"
|
399
|
+
Access-Control-Max-Age:
|
400
|
+
- '600'
|
401
|
+
Access-Control-Allow-Methods:
|
402
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
403
|
+
Access-Control-Allow-Headers:
|
404
|
+
- Content-Type, x-requested-with
|
405
|
+
body:
|
406
|
+
encoding: UTF-8
|
407
|
+
string: '{"address":"test3@example.net","message":"Unsubscribe event has been
|
408
|
+
removed"}'
|
409
|
+
http_version:
|
410
|
+
recorded_at: Wed, 30 Nov 2016 20:53:51 GMT
|
411
|
+
- request:
|
412
|
+
method: delete
|
413
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/unsubscribes/test4@example.info
|
414
|
+
body:
|
415
|
+
encoding: US-ASCII
|
416
|
+
string: ''
|
417
|
+
headers:
|
418
|
+
Accept:
|
419
|
+
- "*/*"
|
420
|
+
Accept-Encoding:
|
421
|
+
- gzip, deflate
|
422
|
+
User-Agent:
|
423
|
+
- rest-client/2.0.0 (linux-gnu x86_64) ruby/2.3.1p112
|
424
|
+
Host:
|
425
|
+
- api.mailgun.net
|
426
|
+
response:
|
427
|
+
status:
|
428
|
+
code: 200
|
429
|
+
message: OK
|
430
|
+
headers:
|
431
|
+
Server:
|
432
|
+
- nginx
|
433
|
+
Date:
|
434
|
+
- Wed, 30 Nov 2016 20:51:46 GMT
|
435
|
+
Content-Type:
|
436
|
+
- application/json; charset=utf-8
|
437
|
+
Content-Length:
|
438
|
+
- '79'
|
439
|
+
Connection:
|
440
|
+
- keep-alive
|
441
|
+
Access-Control-Allow-Origin:
|
442
|
+
- "*"
|
443
|
+
Access-Control-Max-Age:
|
444
|
+
- '600'
|
445
|
+
Access-Control-Allow-Methods:
|
446
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
447
|
+
Access-Control-Allow-Headers:
|
448
|
+
- Content-Type, x-requested-with
|
449
|
+
body:
|
450
|
+
encoding: UTF-8
|
451
|
+
string: '{"address":"test4@example.info","message":"Unsubscribe event has been
|
452
|
+
removed"}'
|
453
|
+
http_version:
|
454
|
+
recorded_at: Wed, 30 Nov 2016 20:53:52 GMT
|
455
|
+
- request:
|
456
|
+
method: post
|
457
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/complaints
|
458
|
+
body:
|
459
|
+
encoding: UTF-8
|
460
|
+
string: '[{"address":"test4@example.info"},{"address":"test3@example.net"},{"address":"test2@example.org"},{"address":"test1@example.com"}]'
|
461
|
+
headers:
|
462
|
+
Accept:
|
463
|
+
- "*/*"
|
464
|
+
Accept-Encoding:
|
465
|
+
- gzip, deflate
|
466
|
+
User-Agent:
|
467
|
+
- rest-client/2.0.0 (linux-gnu x86_64) ruby/2.3.1p112
|
468
|
+
Content-Type:
|
469
|
+
- application/json
|
470
|
+
Content-Length:
|
471
|
+
- '130'
|
472
|
+
Host:
|
473
|
+
- api.mailgun.net
|
474
|
+
response:
|
475
|
+
status:
|
476
|
+
code: 200
|
477
|
+
message: OK
|
478
|
+
headers:
|
479
|
+
Server:
|
480
|
+
- nginx
|
481
|
+
Date:
|
482
|
+
- Wed, 30 Nov 2016 20:51:47 GMT
|
483
|
+
Content-Type:
|
484
|
+
- application/json; charset=utf-8
|
485
|
+
Content-Length:
|
486
|
+
- '75'
|
487
|
+
Connection:
|
488
|
+
- keep-alive
|
489
|
+
Access-Control-Allow-Origin:
|
490
|
+
- "*"
|
491
|
+
Access-Control-Max-Age:
|
492
|
+
- '600'
|
493
|
+
Access-Control-Allow-Methods:
|
494
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
495
|
+
Access-Control-Allow-Headers:
|
496
|
+
- Content-Type, x-requested-with
|
497
|
+
body:
|
498
|
+
encoding: UTF-8
|
499
|
+
string: '{"message":"4 complaint addresses have been added to the complaints
|
500
|
+
table"}'
|
501
|
+
http_version:
|
502
|
+
recorded_at: Wed, 30 Nov 2016 20:53:52 GMT
|
503
|
+
- request:
|
504
|
+
method: delete
|
505
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/complaints/test1@example.com
|
506
|
+
body:
|
507
|
+
encoding: US-ASCII
|
508
|
+
string: ''
|
509
|
+
headers:
|
510
|
+
Accept:
|
511
|
+
- "*/*"
|
512
|
+
Accept-Encoding:
|
513
|
+
- gzip, deflate
|
514
|
+
User-Agent:
|
515
|
+
- rest-client/2.0.0 (linux-gnu x86_64) ruby/2.3.1p112
|
516
|
+
Host:
|
517
|
+
- api.mailgun.net
|
518
|
+
response:
|
519
|
+
status:
|
520
|
+
code: 200
|
521
|
+
message: OK
|
522
|
+
headers:
|
523
|
+
Server:
|
524
|
+
- nginx
|
525
|
+
Date:
|
526
|
+
- Wed, 30 Nov 2016 20:51:47 GMT
|
527
|
+
Content-Type:
|
528
|
+
- application/json; charset=utf-8
|
529
|
+
Content-Length:
|
530
|
+
- '75'
|
531
|
+
Connection:
|
532
|
+
- keep-alive
|
533
|
+
Access-Control-Allow-Origin:
|
534
|
+
- "*"
|
535
|
+
Access-Control-Max-Age:
|
536
|
+
- '600'
|
537
|
+
Access-Control-Allow-Methods:
|
538
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
539
|
+
Access-Control-Allow-Headers:
|
540
|
+
- Content-Type, x-requested-with
|
541
|
+
body:
|
542
|
+
encoding: UTF-8
|
543
|
+
string: '{"address":"test1@example.com","message":"Spam complaint has been removed"}'
|
544
|
+
http_version:
|
545
|
+
recorded_at: Wed, 30 Nov 2016 20:53:52 GMT
|
546
|
+
- request:
|
547
|
+
method: delete
|
548
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/complaints/test2@example.org
|
549
|
+
body:
|
550
|
+
encoding: US-ASCII
|
551
|
+
string: ''
|
552
|
+
headers:
|
553
|
+
Accept:
|
554
|
+
- "*/*"
|
555
|
+
Accept-Encoding:
|
556
|
+
- gzip, deflate
|
557
|
+
User-Agent:
|
558
|
+
- rest-client/2.0.0 (linux-gnu x86_64) ruby/2.3.1p112
|
559
|
+
Host:
|
560
|
+
- api.mailgun.net
|
561
|
+
response:
|
562
|
+
status:
|
563
|
+
code: 200
|
564
|
+
message: OK
|
565
|
+
headers:
|
566
|
+
Server:
|
567
|
+
- nginx
|
568
|
+
Date:
|
569
|
+
- Wed, 30 Nov 2016 20:51:47 GMT
|
570
|
+
Content-Type:
|
571
|
+
- application/json; charset=utf-8
|
572
|
+
Content-Length:
|
573
|
+
- '75'
|
574
|
+
Connection:
|
575
|
+
- keep-alive
|
576
|
+
Access-Control-Allow-Origin:
|
577
|
+
- "*"
|
578
|
+
Access-Control-Max-Age:
|
579
|
+
- '600'
|
580
|
+
Access-Control-Allow-Methods:
|
581
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
582
|
+
Access-Control-Allow-Headers:
|
583
|
+
- Content-Type, x-requested-with
|
584
|
+
body:
|
585
|
+
encoding: UTF-8
|
586
|
+
string: '{"address":"test2@example.org","message":"Spam complaint has been removed"}'
|
587
|
+
http_version:
|
588
|
+
recorded_at: Wed, 30 Nov 2016 20:53:52 GMT
|
589
|
+
- request:
|
590
|
+
method: delete
|
591
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/complaints/test3@example.net
|
592
|
+
body:
|
593
|
+
encoding: US-ASCII
|
594
|
+
string: ''
|
595
|
+
headers:
|
596
|
+
Accept:
|
597
|
+
- "*/*"
|
598
|
+
Accept-Encoding:
|
599
|
+
- gzip, deflate
|
600
|
+
User-Agent:
|
601
|
+
- rest-client/2.0.0 (linux-gnu x86_64) ruby/2.3.1p112
|
602
|
+
Host:
|
603
|
+
- api.mailgun.net
|
604
|
+
response:
|
605
|
+
status:
|
606
|
+
code: 200
|
607
|
+
message: OK
|
608
|
+
headers:
|
609
|
+
Server:
|
610
|
+
- nginx
|
611
|
+
Date:
|
612
|
+
- Wed, 30 Nov 2016 20:51:47 GMT
|
613
|
+
Content-Type:
|
614
|
+
- application/json; charset=utf-8
|
615
|
+
Content-Length:
|
616
|
+
- '75'
|
617
|
+
Connection:
|
618
|
+
- keep-alive
|
619
|
+
Access-Control-Allow-Origin:
|
620
|
+
- "*"
|
621
|
+
Access-Control-Max-Age:
|
622
|
+
- '600'
|
623
|
+
Access-Control-Allow-Methods:
|
624
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
625
|
+
Access-Control-Allow-Headers:
|
626
|
+
- Content-Type, x-requested-with
|
627
|
+
body:
|
628
|
+
encoding: UTF-8
|
629
|
+
string: '{"address":"test3@example.net","message":"Spam complaint has been removed"}'
|
630
|
+
http_version:
|
631
|
+
recorded_at: Wed, 30 Nov 2016 20:53:53 GMT
|
632
|
+
- request:
|
633
|
+
method: delete
|
634
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/complaints/test4@example.info
|
635
|
+
body:
|
636
|
+
encoding: US-ASCII
|
637
|
+
string: ''
|
638
|
+
headers:
|
639
|
+
Accept:
|
640
|
+
- "*/*"
|
641
|
+
Accept-Encoding:
|
642
|
+
- gzip, deflate
|
643
|
+
User-Agent:
|
644
|
+
- rest-client/2.0.0 (linux-gnu x86_64) ruby/2.3.1p112
|
645
|
+
Host:
|
646
|
+
- api.mailgun.net
|
647
|
+
response:
|
648
|
+
status:
|
649
|
+
code: 200
|
650
|
+
message: OK
|
651
|
+
headers:
|
652
|
+
Server:
|
653
|
+
- nginx
|
654
|
+
Date:
|
655
|
+
- Wed, 30 Nov 2016 20:51:47 GMT
|
656
|
+
Content-Type:
|
657
|
+
- application/json; charset=utf-8
|
658
|
+
Content-Length:
|
659
|
+
- '76'
|
660
|
+
Connection:
|
661
|
+
- keep-alive
|
662
|
+
Access-Control-Allow-Origin:
|
663
|
+
- "*"
|
664
|
+
Access-Control-Max-Age:
|
665
|
+
- '600'
|
666
|
+
Access-Control-Allow-Methods:
|
667
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
668
|
+
Access-Control-Allow-Headers:
|
669
|
+
- Content-Type, x-requested-with
|
670
|
+
body:
|
671
|
+
encoding: UTF-8
|
672
|
+
string: '{"address":"test4@example.info","message":"Spam complaint has been
|
673
|
+
removed"}'
|
674
|
+
http_version:
|
675
|
+
recorded_at: Wed, 30 Nov 2016 20:53:53 GMT
|
676
|
+
- request:
|
677
|
+
method: post
|
678
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/unsubscribes
|
679
|
+
body:
|
680
|
+
encoding: UTF-8
|
681
|
+
string: '[{"address":"test4@example.info","tag":"integration"},{"address":"test3@example.net","tag":"integration"},{"address":"test2@example.org","tag":"integration"},{"address":"test1@example.com","tag":"integration"}]'
|
682
|
+
headers:
|
683
|
+
Accept:
|
684
|
+
- "*/*"
|
685
|
+
Accept-Encoding:
|
686
|
+
- gzip, deflate
|
687
|
+
User-Agent:
|
688
|
+
- rest-client/2.0.2 (darwin18.7.0 x86_64) ruby/2.5.7p206
|
689
|
+
Content-Type:
|
690
|
+
- application/json
|
691
|
+
Content-Length:
|
692
|
+
- '210'
|
693
|
+
Host:
|
694
|
+
- api.mailgun.net
|
695
|
+
response:
|
696
|
+
status:
|
697
|
+
code: 200
|
698
|
+
message: OK
|
699
|
+
headers:
|
700
|
+
Access-Control-Allow-Headers:
|
701
|
+
- Content-Type, x-requested-with
|
702
|
+
Access-Control-Allow-Methods:
|
703
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
704
|
+
Access-Control-Allow-Origin:
|
705
|
+
- "*"
|
706
|
+
Access-Control-Max-Age:
|
707
|
+
- '600'
|
708
|
+
Content-Type:
|
709
|
+
- application/json; charset=utf-8
|
710
|
+
Date:
|
711
|
+
- Tue, 04 Feb 2020 15:16:07 GMT
|
712
|
+
Server:
|
713
|
+
- nginx
|
714
|
+
Strict-Transport-Security:
|
715
|
+
- max-age=63072000; includeSubDomains
|
716
|
+
Content-Length:
|
717
|
+
- '68'
|
718
|
+
Connection:
|
719
|
+
- keep-alive
|
720
|
+
body:
|
721
|
+
encoding: UTF-8
|
722
|
+
string: '{"message":"4 addresses have been added to the unsubscribes table"}
|
723
|
+
|
724
|
+
'
|
725
|
+
http_version:
|
726
|
+
recorded_at: Tue, 04 Feb 2020 15:16:07 GMT
|
727
|
+
recorded_with: VCR 3.0.3
|