mailgun-ruby 1.2.15 → 1.3.5

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.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/CHANGELOG.md +52 -3
  4. data/Gemfile +1 -0
  5. data/README.md +2 -2
  6. data/docs/MessageBuilder.md +12 -0
  7. data/docs/Metrics.md +108 -0
  8. data/docs/Webhooks.md +4 -2
  9. data/lib/mailgun/chains.rb +1 -1
  10. data/lib/mailgun/client.rb +40 -30
  11. data/lib/mailgun/domains/domains.rb +19 -0
  12. data/lib/mailgun/events/events.rb +4 -4
  13. data/lib/mailgun/exceptions/exceptions.rb +7 -7
  14. data/lib/mailgun/messages/message_builder.rb +14 -2
  15. data/lib/mailgun/metrics/metrics.rb +61 -0
  16. data/lib/mailgun/response.rb +11 -10
  17. data/lib/mailgun/version.rb +1 -1
  18. data/lib/mailgun.rb +2 -1
  19. data/mailgun.gemspec +6 -3
  20. data/spec/integration/domains_spec.rb +95 -92
  21. data/spec/integration/email_validation_spec.rb +2 -1
  22. data/spec/integration/list_spec.rb +1 -1
  23. data/spec/integration/mailer_spec.rb +5 -5
  24. data/spec/integration/mailgun_spec.rb +14 -12
  25. data/spec/integration/metrics_spec.rb +218 -0
  26. data/spec/integration/routes_spec.rb +17 -1
  27. data/spec/integration/stats_spec.rb +1 -1
  28. data/spec/integration/unsubscribes_spec.rb +2 -2
  29. data/spec/integration/webhook_spec.rb +1 -1
  30. data/spec/spec_helper.rb +1 -0
  31. data/spec/unit/connection/test_client.rb +1 -1
  32. data/spec/unit/events/events_spec.rb +1 -1
  33. data/spec/unit/exceptions/exceptions_spec.rb +3 -3
  34. data/spec/unit/messages/message_builder_spec.rb +4 -3
  35. data/vcr_cassettes/bounces.yml +59 -98
  36. data/vcr_cassettes/complaints.yml +237 -97
  37. data/vcr_cassettes/domains.yml +332 -763
  38. data/vcr_cassettes/email_validation.yml +81 -144
  39. data/vcr_cassettes/events.yml +24 -63
  40. data/vcr_cassettes/exceptions.yml +49 -2
  41. data/vcr_cassettes/list_members.yml +187 -179
  42. data/vcr_cassettes/mailing_list.yml +309 -17
  43. data/vcr_cassettes/metrics.yml +116 -0
  44. data/vcr_cassettes/routes.yml +246 -246
  45. data/vcr_cassettes/send_message.yml +54 -3
  46. data/vcr_cassettes/stats.yml +28 -24
  47. data/vcr_cassettes/suppressions.yml +229 -447
  48. data/vcr_cassettes/unsubscribes.yml +219 -9
  49. metadata +58 -15
  50. data/docs/Messages.md +0 -107
  51. /data/docs/{railgun/Templates.md → Templates.md} +0 -0
@@ -2,358 +2,358 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://api:<APIKEY>@api.mailgun.net/v3/routes
5
+ uri: https://api.mailgun.net/v3/routes
6
6
  body:
7
- encoding: US-ASCII
8
- string: priority=10&description=Integration%20Test%20Route&expression=match_recipient(%22alice%40DOMAIN.TEST%22)&action=forward(%22.*%40DOMAIN.TEST%22)
7
+ encoding: UTF-8
8
+ string: action=forward%28%22.%2A%40%22%29&description=Integration+Test+Route&expression=match_recipient%28%22alice%40%22%29&priority=10
9
9
  headers:
10
+ User-Agent:
11
+ - mailgun-sdk-ruby/1.3.2
10
12
  Accept:
11
- - "*/*; q=0.5, application/xml"
12
- Accept-Encoding:
13
- - gzip, deflate
14
- Content-Length:
15
- - '213'
13
+ - "*/*"
14
+ Authorization:
15
+ - Basic xxx==
16
16
  Content-Type:
17
17
  - application/x-www-form-urlencoded
18
- User-Agent:
19
- - Ruby
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
20
  response:
21
21
  status:
22
22
  code: 200
23
23
  message: OK
24
24
  headers:
25
- Server:
26
- - nginx
27
- Date:
28
- - Fri, 08 Jan 2016 20:08:18 GMT
29
- Content-Type:
30
- - application/json
31
- Content-Length:
32
- - '402'
33
- Connection:
34
- - keep-alive
35
- Content-Disposition:
36
- - inline
25
+ Access-Control-Allow-Credentials:
26
+ - 'true'
37
27
  Access-Control-Allow-Origin:
38
28
  - "*"
39
- Access-Control-Max-Age:
40
- - '600'
41
- Access-Control-Allow-Methods:
42
- - GET, POST, PUT, DELETE, OPTIONS
43
- Access-Control-Allow-Headers:
44
- - Content-Type, x-requested-with
29
+ Cache-Control:
30
+ - no-store
31
+ Content-Disposition:
32
+ - inline
33
+ Content-Length:
34
+ - '251'
35
+ Content-Type:
36
+ - application/json
37
+ Date:
38
+ - Mon, 27 Jan 2025 17:45:19 GMT
39
+ Server:
40
+ - TwistedWeb/22.10.0
41
+ Strict-Transport-Security:
42
+ - max-age=63072000; includeSubDomains
43
+ X-Mailgun-Key-Id:
44
+ - c02fd0ba-d8dbad66
45
+ X-Xss-Protection:
46
+ - 1; mode=block
45
47
  body:
46
48
  encoding: UTF-8
47
- string: |-
48
- {
49
- "message": "Route has been created",
50
- "route": {
51
- "actions": [
52
- "forward(\".*@DOMAIN.TEST\")"
53
- ],
54
- "created_at": "Fri, 08 Jan 2016 20:08:18 GMT",
55
- "description": "Integration Test Route",
56
- "expression": "match_recipient(\"alice@DOMAIN.TEST\")",
57
- "id": "5690173212573000be30671e",
58
- "priority": 10
59
- }
60
- }
49
+ string: '{"message":"Route has been created","route":{"actions":["forward(\".*@\")"],"created_at":"Mon,
50
+ 27 Jan 2025 17:45:19 GMT","description":"Integration Test Route","expression":"match_recipient(\"alice@\")","id":"6797c62f6ee0a9fcb1ec5eee","priority":10}}
51
+
52
+ '
61
53
  http_version:
62
- recorded_at: Fri, 08 Jan 2016 20:08:19 GMT
54
+ recorded_at: Mon, 27 Jan 2025 17:45:19 GMT
63
55
  - request:
64
56
  method: get
65
- uri: https://api:<APIKEY>@api.mailgun.net/v3/routes?limit=50
57
+ uri: https://api.mailgun.net/v3/routes?limit=50
66
58
  body:
67
59
  encoding: US-ASCII
68
60
  string: ''
69
61
  headers:
62
+ User-Agent:
63
+ - mailgun-sdk-ruby/1.3.2
70
64
  Accept:
71
65
  - "*/*"
66
+ Authorization:
67
+ - Basic xxx==
72
68
  Accept-Encoding:
73
- - gzip, deflate
74
- User-Agent:
75
- - Ruby
69
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
76
70
  response:
77
71
  status:
78
72
  code: 200
79
73
  message: OK
80
74
  headers:
81
- Server:
82
- - nginx
83
- Date:
84
- - Fri, 08 Jan 2016 20:08:18 GMT
85
- Content-Type:
86
- - application/json
87
- Content-Length:
88
- - '1155'
89
- Connection:
90
- - keep-alive
91
- Content-Disposition:
92
- - inline
75
+ Access-Control-Allow-Credentials:
76
+ - 'true'
93
77
  Access-Control-Allow-Origin:
94
78
  - "*"
95
- Access-Control-Max-Age:
96
- - '600'
97
- Access-Control-Allow-Methods:
98
- - GET, POST, PUT, DELETE, OPTIONS
99
- Access-Control-Allow-Headers:
100
- - Content-Type, x-requested-with
79
+ Cache-Control:
80
+ - no-store
81
+ Content-Disposition:
82
+ - inline
83
+ Content-Length:
84
+ - '234'
85
+ Content-Type:
86
+ - application/json
87
+ Date:
88
+ - Mon, 27 Jan 2025 17:45:20 GMT
89
+ Server:
90
+ - TwistedWeb/22.10.0
91
+ Strict-Transport-Security:
92
+ - max-age=63072000; includeSubDomains
93
+ X-Mailgun-Key-Id:
94
+ - c02fd0ba-d8dbad66
95
+ X-Xss-Protection:
96
+ - 1; mode=block
101
97
  body:
102
98
  encoding: UTF-8
103
- string: |-
104
- {
105
- "items": [
106
- {
107
- "actions": [
108
- "forward(\".*@DOMAIN.TEST\")"
109
- ],
110
- "created_at": "Fri, 08 Jan 2016 20:08:18 GMT",
111
- "description": "Integration Test Route",
112
- "expression": "match_recipient(\"alice@DOMAIN.TEST\")",
113
- "id": "5690173212573000be30671e",
114
- "priority": 10
115
- },
116
- {
117
- "actions": [
118
- "forward(\".*@DOMAIN.TEST\")"
119
- ],
120
- "created_at": "Fri, 08 Jan 2016 19:55:02 GMT",
121
- "description": "Integration Test Route",
122
- "expression": "match_recipient(\"alice@DOMAIN.TEST\")",
123
- "id": "5690141612573000b69c0e35",
124
- "priority": 10
125
- },
126
- {
127
- "actions": [
128
- "forward(\".*@DOMAIN.TEST\")"
129
- ],
130
- "created_at": "Fri, 08 Jan 2016 19:53:50 GMT",
131
- "description": "Integration Test Route",
132
- "expression": "match_recipient(\"alice@DOMAIN.TEST\")",
133
- "id": "569013ce11e2bdcea3fbcd1d",
134
- "priority": 10
135
- }
136
- ],
137
- "total_count": 3
138
- }
99
+ string: '{"items":[{"actions":["forward(\".*@\")"],"created_at":"Mon, 27 Jan
100
+ 2025 17:45:19 GMT","description":"Integration Test Route","expression":"match_recipient(\"alice@\")","id":"6797c62f6ee0a9fcb1ec5eee","priority":10}],"total_count":1}
101
+
102
+ '
139
103
  http_version:
140
- recorded_at: Fri, 08 Jan 2016 20:08:19 GMT
104
+ recorded_at: Mon, 27 Jan 2025 17:45:20 GMT
141
105
  - request:
142
106
  method: get
143
- uri: https://api:<APIKEY>@api.mailgun.net/v3/routes?limit=1
107
+ uri: https://api.mailgun.net/v3/routes?limit=1
144
108
  body:
145
109
  encoding: US-ASCII
146
110
  string: ''
147
111
  headers:
112
+ User-Agent:
113
+ - mailgun-sdk-ruby/1.3.2
148
114
  Accept:
149
115
  - "*/*"
116
+ Authorization:
117
+ - Basic xxx==
150
118
  Accept-Encoding:
151
- - gzip, deflate
152
- User-Agent:
153
- - Ruby
119
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
154
120
  response:
155
121
  status:
156
122
  code: 200
157
123
  message: OK
158
124
  headers:
159
- Server:
160
- - nginx
161
- Date:
162
- - Fri, 08 Jan 2016 20:08:19 GMT
163
- Content-Type:
164
- - application/json
165
- Content-Length:
166
- - '411'
167
- Connection:
168
- - keep-alive
169
- Content-Disposition:
170
- - inline
125
+ Access-Control-Allow-Credentials:
126
+ - 'true'
171
127
  Access-Control-Allow-Origin:
172
128
  - "*"
173
- Access-Control-Max-Age:
174
- - '600'
175
- Access-Control-Allow-Methods:
176
- - GET, POST, PUT, DELETE, OPTIONS
177
- Access-Control-Allow-Headers:
178
- - Content-Type, x-requested-with
129
+ Cache-Control:
130
+ - no-store
131
+ Content-Disposition:
132
+ - inline
133
+ Content-Length:
134
+ - '234'
135
+ Content-Type:
136
+ - application/json
137
+ Date:
138
+ - Mon, 27 Jan 2025 17:45:20 GMT
139
+ Server:
140
+ - TwistedWeb/22.10.0
141
+ Strict-Transport-Security:
142
+ - max-age=63072000; includeSubDomains
143
+ X-Mailgun-Key-Id:
144
+ - c02fd0ba-d8dbad66
145
+ X-Xss-Protection:
146
+ - 1; mode=block
179
147
  body:
180
148
  encoding: UTF-8
181
- string: |-
182
- {
183
- "items": [
184
- {
185
- "actions": [
186
- "forward(\".*@DOMAIN.TEST\")"
187
- ],
188
- "created_at": "Fri, 08 Jan 2016 20:08:18 GMT",
189
- "description": "Integration Test Route",
190
- "expression": "match_recipient(\"alice@DOMAIN.TEST\")",
191
- "id": "5690173212573000be30671e",
192
- "priority": 10
193
- }
194
- ],
195
- "total_count": 3
196
- }
149
+ string: '{"items":[{"actions":["forward(\".*@\")"],"created_at":"Mon, 27 Jan
150
+ 2025 17:45:19 GMT","description":"Integration Test Route","expression":"match_recipient(\"alice@\")","id":"6797c62f6ee0a9fcb1ec5eee","priority":10}],"total_count":1}
151
+
152
+ '
197
153
  http_version:
198
- recorded_at: Fri, 08 Jan 2016 20:08:19 GMT
154
+ recorded_at: Mon, 27 Jan 2025 17:45:20 GMT
199
155
  - request:
200
156
  method: get
201
- uri: https://api:<APIKEY>@api.mailgun.net/v3/routes/5690173212573000be30671e
157
+ uri: https://api.mailgun.net/v3/routes/6797c62f6ee0a9fcb1ec5eee
202
158
  body:
203
159
  encoding: US-ASCII
204
160
  string: ''
205
161
  headers:
162
+ User-Agent:
163
+ - mailgun-sdk-ruby/1.3.2
206
164
  Accept:
207
165
  - "*/*"
166
+ Authorization:
167
+ - Basic xxx==
208
168
  Accept-Encoding:
209
- - gzip, deflate
210
- User-Agent:
211
- - Ruby
169
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
212
170
  response:
213
171
  status:
214
172
  code: 200
215
173
  message: OK
216
174
  headers:
217
- Server:
218
- - nginx
219
- Date:
220
- - Fri, 08 Jan 2016 20:08:19 GMT
221
- Content-Type:
222
- - application/json
223
- Content-Length:
224
- - '363'
225
- Connection:
226
- - keep-alive
227
- Content-Disposition:
228
- - inline
175
+ Access-Control-Allow-Credentials:
176
+ - 'true'
229
177
  Access-Control-Allow-Origin:
230
178
  - "*"
231
- Access-Control-Max-Age:
232
- - '600'
233
- Access-Control-Allow-Methods:
234
- - GET, POST, PUT, DELETE, OPTIONS
235
- Access-Control-Allow-Headers:
236
- - Content-Type, x-requested-with
179
+ Cache-Control:
180
+ - no-store
181
+ Content-Disposition:
182
+ - inline
183
+ Content-Length:
184
+ - '216'
185
+ Content-Type:
186
+ - application/json
187
+ Date:
188
+ - Mon, 27 Jan 2025 17:45:21 GMT
189
+ Server:
190
+ - TwistedWeb/22.10.0
191
+ Strict-Transport-Security:
192
+ - max-age=63072000; includeSubDomains
193
+ X-Mailgun-Key-Id:
194
+ - c02fd0ba-d8dbad66
195
+ X-Xss-Protection:
196
+ - 1; mode=block
237
197
  body:
238
198
  encoding: UTF-8
239
- string: |-
240
- {
241
- "route": {
242
- "actions": [
243
- "forward(\".*@DOMAIN.TEST\")"
244
- ],
245
- "created_at": "Fri, 08 Jan 2016 20:08:18 GMT",
246
- "description": "Integration Test Route",
247
- "expression": "match_recipient(\"alice@DOMAIN.TEST\")",
248
- "id": "5690173212573000be30671e",
249
- "priority": 10
250
- }
251
- }
199
+ string: '{"route":{"actions":["forward(\".*@\")"],"created_at":"Mon, 27 Jan
200
+ 2025 17:45:19 GMT","description":"Integration Test Route","expression":"match_recipient(\"alice@\")","id":"6797c62f6ee0a9fcb1ec5eee","priority":10}}
201
+
202
+ '
252
203
  http_version:
253
- recorded_at: Fri, 08 Jan 2016 20:08:19 GMT
204
+ recorded_at: Mon, 27 Jan 2025 17:45:21 GMT
254
205
  - request:
255
206
  method: put
256
- uri: https://api:<APIKEY>@api.mailgun.net/v3/routes/5690173212573000be30671e
207
+ uri: https://api.mailgun.net/v3/routes/6797c62f6ee0a9fcb1ec5eee
257
208
  body:
258
- encoding: US-ASCII
259
- string: priority=10&description=Integration%20Test%20Route%20Update&expression=match_recipient(%22alice%40DOMAIN.TEST%22)&action=forward(%22.*%40DOMAIN.TEST%22)
209
+ encoding: UTF-8
210
+ string: action=forward%28%22.%2A%40%22%29&description=Integration+Test+Route+Update&expression=match_recipient%28%22alice%40%22%29&priority=10
260
211
  headers:
212
+ User-Agent:
213
+ - mailgun-sdk-ruby/1.3.2
261
214
  Accept:
262
- - "*/*; q=0.5, application/xml"
263
- Accept-Encoding:
264
- - gzip, deflate
265
- Content-Length:
266
- - '222'
215
+ - "*/*"
216
+ Authorization:
217
+ - Basic xxx==
267
218
  Content-Type:
268
219
  - application/x-www-form-urlencoded
269
- User-Agent:
270
- - Ruby
220
+ Accept-Encoding:
221
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
271
222
  response:
272
223
  status:
273
224
  code: 200
274
225
  message: OK
275
226
  headers:
276
- Server:
277
- - nginx
278
- Date:
279
- - Fri, 08 Jan 2016 20:08:19 GMT
280
- Content-Type:
281
- - application/json
282
- Content-Length:
283
- - '376'
284
- Connection:
285
- - keep-alive
286
- Content-Disposition:
287
- - inline
227
+ Access-Control-Allow-Credentials:
228
+ - 'true'
288
229
  Access-Control-Allow-Origin:
289
230
  - "*"
290
- Access-Control-Max-Age:
291
- - '600'
292
- Access-Control-Allow-Methods:
293
- - GET, POST, PUT, DELETE, OPTIONS
294
- Access-Control-Allow-Headers:
295
- - Content-Type, x-requested-with
231
+ Cache-Control:
232
+ - no-store
233
+ Content-Disposition:
234
+ - inline
235
+ Content-Length:
236
+ - '248'
237
+ Content-Type:
238
+ - application/json
239
+ Date:
240
+ - Mon, 27 Jan 2025 17:45:22 GMT
241
+ Server:
242
+ - TwistedWeb/22.10.0
243
+ Strict-Transport-Security:
244
+ - max-age=63072000; includeSubDomains
245
+ X-Mailgun-Key-Id:
246
+ - c02fd0ba-d8dbad66
247
+ X-Xss-Protection:
248
+ - 1; mode=block
296
249
  body:
297
250
  encoding: UTF-8
298
- string: |-
299
- {
300
- "actions": [
301
- "forward(\".*@DOMAIN.TEST\")"
302
- ],
303
- "created_at": "Fri, 08 Jan 2016 20:08:18 GMT",
304
- "description": "Integration Test Route Update",
305
- "expression": "match_recipient(\"alice@DOMAIN.TEST\")",
306
- "id": "5690173212573000be30671e",
307
- "message": "Route has been updated",
308
- "priority": 10
309
- }
251
+ string: '{"actions":["forward(\".*@\")"],"created_at":"Mon, 27 Jan 2025 17:45:19
252
+ GMT","description":"Integration Test Route Update","expression":"match_recipient(\"alice@\")","id":"6797c62f6ee0a9fcb1ec5eee","message":"Route
253
+ has been updated","priority":10}
254
+
255
+ '
310
256
  http_version:
311
- recorded_at: Fri, 08 Jan 2016 20:08:19 GMT
257
+ recorded_at: Mon, 27 Jan 2025 17:45:22 GMT
312
258
  - request:
313
259
  method: delete
314
- uri: https://api:<APIKEY>@api.mailgun.net/v3/routes/5690173212573000be30671e
260
+ uri: https://api.mailgun.net/v3/routes/6797c62f6ee0a9fcb1ec5eee
315
261
  body:
316
262
  encoding: US-ASCII
317
263
  string: ''
318
264
  headers:
265
+ User-Agent:
266
+ - mailgun-sdk-ruby/1.3.2
319
267
  Accept:
320
- - "*/*; q=0.5, application/xml"
268
+ - "*/*"
269
+ Authorization:
270
+ - Basic xxx==
321
271
  Accept-Encoding:
322
- - gzip, deflate
323
- User-Agent:
324
- - Ruby
272
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
325
273
  response:
326
274
  status:
327
275
  code: 200
328
276
  message: OK
329
277
  headers:
330
- Server:
331
- - nginx
332
- Date:
333
- - Fri, 08 Jan 2016 20:08:19 GMT
334
- Content-Type:
335
- - application/json
336
- Content-Length:
337
- - '77'
338
- Connection:
339
- - keep-alive
278
+ Access-Control-Allow-Credentials:
279
+ - 'true'
280
+ Access-Control-Allow-Origin:
281
+ - "*"
282
+ Cache-Control:
283
+ - no-store
340
284
  Content-Disposition:
341
285
  - inline
286
+ Content-Length:
287
+ - '69'
288
+ Content-Type:
289
+ - application/json
290
+ Date:
291
+ - Mon, 27 Jan 2025 17:45:22 GMT
292
+ Server:
293
+ - TwistedWeb/22.10.0
294
+ Strict-Transport-Security:
295
+ - max-age=63072000; includeSubDomains
296
+ X-Mailgun-Key-Id:
297
+ - c02fd0ba-d8dbad66
298
+ X-Xss-Protection:
299
+ - 1; mode=block
300
+ body:
301
+ encoding: UTF-8
302
+ string: '{"id":"6797c62f6ee0a9fcb1ec5eee","message":"Route has been deleted"}
303
+
304
+ '
305
+ http_version:
306
+ recorded_at: Mon, 27 Jan 2025 17:45:23 GMT
307
+ - request:
308
+ method: post
309
+ uri: https://api.mailgun.net/v3/routes
310
+ body:
311
+ encoding: UTF-8
312
+ string: action=forward%28%22.%2A%40%22%29&action=stop%28%29&description=Integration+Test+Route&expression=match_recipient%28%22alice%40%22%29&priority=10
313
+ headers:
314
+ User-Agent:
315
+ - mailgun-sdk-ruby/1.3.2
316
+ Accept:
317
+ - "*/*"
318
+ Authorization:
319
+ - Basic xxx==
320
+ Content-Type:
321
+ - application/x-www-form-urlencoded
322
+ Accept-Encoding:
323
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
324
+ response:
325
+ status:
326
+ code: 200
327
+ message: OK
328
+ headers:
329
+ Access-Control-Allow-Credentials:
330
+ - 'true'
342
331
  Access-Control-Allow-Origin:
343
332
  - "*"
344
- Access-Control-Max-Age:
345
- - '600'
346
- Access-Control-Allow-Methods:
347
- - GET, POST, PUT, DELETE, OPTIONS
348
- Access-Control-Allow-Headers:
349
- - Content-Type, x-requested-with
333
+ Cache-Control:
334
+ - no-store
335
+ Content-Disposition:
336
+ - inline
337
+ Content-Length:
338
+ - '260'
339
+ Content-Type:
340
+ - application/json
341
+ Date:
342
+ - Mon, 27 Jan 2025 18:13:42 GMT
343
+ Server:
344
+ - TwistedWeb/22.10.0
345
+ Strict-Transport-Security:
346
+ - max-age=63072000; includeSubDomains
347
+ X-Mailgun-Key-Id:
348
+ - c02fd0ba-d8dbad66
349
+ X-Xss-Protection:
350
+ - 1; mode=block
350
351
  body:
351
352
  encoding: UTF-8
352
- string: |-
353
- {
354
- "id": "5690173212573000be30671e",
355
- "message": "Route has been deleted"
356
- }
353
+ string: '{"message":"Route has been created","route":{"actions":["forward(\".*@\")","stop()"],"created_at":"Mon,
354
+ 27 Jan 2025 18:13:42 GMT","description":"Integration Test Route","expression":"match_recipient(\"alice@\")","id":"6797ccd69440716211d9df05","priority":10}}
355
+
356
+ '
357
357
  http_version:
358
- recorded_at: Fri, 08 Jan 2016 20:08:20 GMT
359
- recorded_with: VCR 3.0.1
358
+ recorded_at: Mon, 27 Jan 2025 18:13:42 GMT
359
+ recorded_with: VCR 3.0.3
@@ -49,7 +49,7 @@ http_interactions:
49
49
  "id": "<20160107220803.53710.46802@DOMAIN.TEST>",
50
50
  "message": "Queued. Thank you."
51
51
  }
52
- http_version:
52
+ http_version:
53
53
  recorded_at: Thu, 07 Jan 2016 22:08:03 GMT
54
54
  - request:
55
55
  method: post
@@ -102,6 +102,57 @@ http_interactions:
102
102
  "id": "<20160107220803.17329.90097@DOMAIN.TEST>",
103
103
  "message": "Queued. Thank you."
104
104
  }
105
- http_version:
105
+ http_version:
106
106
  recorded_at: Thu, 07 Jan 2016 22:08:03 GMT
107
- recorded_with: VCR 3.0.1
107
+ - request:
108
+ method: post
109
+ uri: https://api.mailgun.net/v3/DOMAIN.TEST/messages
110
+ body:
111
+ encoding: UTF-8
112
+ string: from=bob%40DOMAIN.TEST&o%3Atestmode=true&subject=Hash+Integration+Test&text=INTEGRATION+TESTING&to=sally%40DOMAIN.TEST
113
+ headers:
114
+ User-Agent:
115
+ - mailgun-sdk-ruby/1.3.0
116
+ Accept:
117
+ - "*/*"
118
+ Authorization:
119
+ - Basic xxx==
120
+ Content-Type:
121
+ - application/x-www-form-urlencoded
122
+ Accept-Encoding:
123
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
124
+ response:
125
+ status:
126
+ code: 403
127
+ message: Forbidden
128
+ headers:
129
+ Access-Control-Allow-Credentials:
130
+ - 'true'
131
+ Access-Control-Allow-Origin:
132
+ - "*"
133
+ Cache-Control:
134
+ - no-store
135
+ Content-Length:
136
+ - '236'
137
+ Content-Type:
138
+ - application/json; charset=utf-8
139
+ Date:
140
+ - Sun, 26 Jan 2025 07:29:31 GMT
141
+ Strict-Transport-Security:
142
+ - max-age=63072000; includeSubDomains
143
+ X-Mailgun-Key-Id:
144
+ - 90b59dea-f2d12a53
145
+ X-Server:
146
+ - influx
147
+ X-Xss-Protection:
148
+ - 1; mode=block
149
+ body:
150
+ encoding: UTF-8
151
+ string: '{"message":"Domain DOMAIN.TEST is not allowed to send: Sandbox subdomains
152
+ are for test purposes only. Please add your own domain or add the address
153
+ to authorized recipients in Account Settings."}
154
+
155
+ '
156
+ http_version:
157
+ recorded_at: Sun, 26 Jan 2025 07:29:31 GMT
158
+ recorded_with: VCR 3.0.3