mailgun-ruby 1.3.10 → 1.4.1
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 +4 -4
- data/.github/workflows/ci.yml +2 -3
- data/CHANGELOG.md +11 -2
- data/README.md +1 -1
- data/docs/Domains.md +71 -18
- data/docs/MessageBuilder.md +1 -1
- data/lib/mailgun/address.rb +0 -2
- data/lib/mailgun/client.rb +36 -21
- data/lib/mailgun/domains/domains.rb +187 -176
- data/lib/mailgun/events/events.rb +0 -2
- data/lib/mailgun/exceptions/exceptions.rb +2 -0
- data/lib/mailgun/helpers/api_version_checker.rb +41 -0
- data/lib/mailgun/lists/opt_in_handler.rb +0 -3
- data/lib/mailgun/logs/logs.rb +0 -2
- data/lib/mailgun/messages/batch_message.rb +0 -2
- data/lib/mailgun/messages/message_builder.rb +0 -4
- data/lib/mailgun/metrics/metrics.rb +0 -2
- data/lib/mailgun/subaccounts/subaccounts.rb +0 -2
- data/lib/mailgun/suppressions.rb +2 -6
- data/lib/mailgun/tags/analytics_tags.rb +32 -0
- data/lib/mailgun/tags/tags.rb +11 -2
- data/lib/mailgun/templates/templates.rb +0 -2
- data/lib/mailgun/version.rb +1 -1
- data/lib/mailgun-ruby.rb +2 -2
- data/lib/mailgun.rb +34 -18
- data/lib/railgun/mailer.rb +0 -6
- data/lib/railgun/railtie.rb +9 -2
- data/lib/railgun.rb +12 -5
- data/mailgun.gemspec +7 -7
- data/spec/integration/domains_spec.rb +218 -192
- data/spec/spec_helper.rb +1 -5
- data/vcr_cassettes/domains.yml +152 -0
- metadata +32 -20
- data/lib/railgun/message.rb +0 -18
- data/spec/integration/tags.rb +0 -139
- data/vcr_cassettes/tags.yml +0 -417
|
@@ -9,276 +9,302 @@ describe 'For the domains endpoint', vcr: vcr_opts do
|
|
|
9
9
|
let(:mg_obj) { Mailgun::Domains.new(mg_client) }
|
|
10
10
|
let(:domain) { 'integration-test.domain.invalid' }
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
context 'Core Domains methods' do
|
|
13
|
+
describe '#list' do
|
|
14
|
+
let(:api_version) { 'v4' }
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
it 'returns a list of domains' do
|
|
17
|
+
response = mg_obj.list
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
expect(response.size).to be > 0
|
|
20
|
+
end
|
|
20
21
|
end
|
|
21
|
-
end
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
describe '#create' do
|
|
24
|
+
let(:api_version) { 'v4' }
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
it 'creates a domain' do
|
|
27
|
+
response = mg_obj.create(domain, { spam_action: 'tag' })
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
expect(response['domain']['name']).to eq(domain)
|
|
30
|
+
expect(response['domain']['spam_action']).to eq('tag')
|
|
31
|
+
end
|
|
31
32
|
end
|
|
32
|
-
end
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
describe '#get' do
|
|
35
|
+
let(:api_version) { 'v4' }
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
it 'returns the domain' do
|
|
38
|
+
response = mg_obj.get(domain)
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
expect(response).to include('domain')
|
|
41
|
+
expect(response['domain']['name']).to eq(domain)
|
|
42
|
+
end
|
|
41
43
|
end
|
|
42
|
-
end
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
context '#update' do
|
|
46
|
+
let(:api_version) { 'v4' }
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
it 'updates the domain' do
|
|
49
|
+
response = mg_obj.update(domain, { spam_action: 'block', web_scheme: 'https', wildcard: true })
|
|
49
50
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
expect(response['domain']['spam_action']).to eq('block')
|
|
52
|
+
expect(response['domain']['web_scheme']).to eq('https')
|
|
53
|
+
expect(response['domain']['wildcard']).to eq(true)
|
|
54
|
+
end
|
|
53
55
|
end
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
context 'delete a domain' do
|
|
57
|
-
subject(:response) { mg_obj.delete(domain) }
|
|
58
56
|
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
context '#verify' do
|
|
58
|
+
let(:api_version) { 'v4' }
|
|
61
59
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
result = mg_obj.create_smtp_credentials(
|
|
65
|
-
domain,
|
|
66
|
-
{
|
|
67
|
-
login: 'test_login'
|
|
68
|
-
}
|
|
69
|
-
)
|
|
60
|
+
it 'verifies the domain' do
|
|
61
|
+
response = mg_obj.verify(domain)
|
|
70
62
|
|
|
71
|
-
|
|
63
|
+
expect(response['message']).to eq('Domain DNS records have been updated')
|
|
64
|
+
end
|
|
72
65
|
end
|
|
73
|
-
end
|
|
74
66
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
'test_login',
|
|
80
|
-
{
|
|
81
|
-
spec: 'abc'
|
|
82
|
-
}
|
|
83
|
-
)
|
|
84
|
-
|
|
85
|
-
expect(result['message']).to eq('Password changed')
|
|
67
|
+
context 'delete a domain' do
|
|
68
|
+
subject(:response) { mg_obj.remove(domain) }
|
|
69
|
+
|
|
70
|
+
it { is_expected.to be_falsey }
|
|
86
71
|
end
|
|
87
72
|
end
|
|
88
73
|
|
|
89
|
-
describe '#delete_smtp_credentials' do
|
|
90
|
-
it 'deletes smtp credentials for domain' do
|
|
91
|
-
result = mg_obj.delete_smtp_credentials(
|
|
92
|
-
domain,
|
|
93
|
-
'test_login'
|
|
94
|
-
)
|
|
95
74
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
75
|
+
context 'Domain::Keys methods' do
|
|
76
|
+
describe '#list_domain_keys' do
|
|
77
|
+
let(:api_version) { 'v1' }
|
|
99
78
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
79
|
+
it 'lists all domain keys' do
|
|
80
|
+
result = mg_obj.list_domain_keys(
|
|
81
|
+
{
|
|
82
|
+
signing_domain: domain
|
|
83
|
+
}
|
|
84
|
+
)
|
|
105
85
|
|
|
106
|
-
|
|
107
|
-
'
|
|
108
|
-
|
|
109
|
-
)
|
|
86
|
+
expect(result).to include('items')
|
|
87
|
+
expect(result['items'].first['selector']).to eq('k1')
|
|
88
|
+
end
|
|
110
89
|
end
|
|
111
|
-
end
|
|
112
90
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
result = mg_obj.update_domain_connection_settings(
|
|
116
|
-
domain,
|
|
117
|
-
{
|
|
118
|
-
require_tls: true,
|
|
119
|
-
skip_verification: true
|
|
120
|
-
}
|
|
121
|
-
)
|
|
122
|
-
|
|
123
|
-
expect(result).to include(
|
|
124
|
-
'require_tls' => true,
|
|
125
|
-
'skip_verification' => true
|
|
126
|
-
)
|
|
127
|
-
end
|
|
128
|
-
end
|
|
91
|
+
describe '#create_domain_key' do
|
|
92
|
+
let(:api_version) { 'v1' }
|
|
129
93
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
94
|
+
it 'creates a domain key' do
|
|
95
|
+
result = mg_obj.create_domain_key(
|
|
96
|
+
{
|
|
97
|
+
signing_domain: domain,
|
|
98
|
+
selector: 'test'
|
|
99
|
+
}
|
|
100
|
+
)
|
|
135
101
|
|
|
136
|
-
|
|
137
|
-
|
|
102
|
+
expect(result['signing_domain']).to eq(domain)
|
|
103
|
+
expect(result['selector']).to eq('test')
|
|
104
|
+
end
|
|
138
105
|
end
|
|
139
|
-
end
|
|
140
106
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
107
|
+
describe '#delete_domain_key' do
|
|
108
|
+
let(:api_version) { 'v1' }
|
|
109
|
+
|
|
110
|
+
it 'deletes a domain key' do
|
|
111
|
+
result = mg_obj.delete_domain_key(
|
|
112
|
+
{
|
|
113
|
+
signing_domain: domain,
|
|
114
|
+
selector: 'test'
|
|
115
|
+
}
|
|
116
|
+
)
|
|
149
117
|
|
|
150
|
-
|
|
118
|
+
expect(result['message']).to eq('success')
|
|
119
|
+
end
|
|
151
120
|
end
|
|
152
|
-
end
|
|
153
121
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
result = mg_obj.update_domain_tracking_click_settings(
|
|
157
|
-
domain,
|
|
158
|
-
{
|
|
159
|
-
active: false
|
|
160
|
-
}
|
|
161
|
-
)
|
|
122
|
+
describe '#activate_domain_key' do
|
|
123
|
+
let(:api_version) { 'v4' }
|
|
162
124
|
|
|
163
|
-
|
|
125
|
+
it 'activates a domain key' do
|
|
126
|
+
|
|
127
|
+
result = mg_obj.activate_domain_key(
|
|
128
|
+
domain,
|
|
129
|
+
'mailo1'
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
expect(result['message']).to eq('domain key activated')
|
|
133
|
+
end
|
|
164
134
|
end
|
|
165
|
-
end
|
|
166
135
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
)
|
|
136
|
+
describe '#get_domain_keys' do
|
|
137
|
+
let(:api_version) { 'v4' }
|
|
138
|
+
|
|
139
|
+
it 'lists the domain keys for a specified signing domain' do
|
|
140
|
+
result = mg_obj.get_domain_keys(
|
|
141
|
+
domain
|
|
142
|
+
)
|
|
175
143
|
|
|
176
|
-
|
|
144
|
+
expect(result).to include('items')
|
|
145
|
+
expect(result['items'].first['selector']).to eq('mailo1')
|
|
146
|
+
end
|
|
177
147
|
end
|
|
178
|
-
end
|
|
179
148
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
result = mg_obj.update_domain_dkim_authority(
|
|
183
|
-
domain,
|
|
184
|
-
{
|
|
185
|
-
self: true
|
|
186
|
-
}
|
|
187
|
-
)
|
|
149
|
+
describe '#deactivate_domain_key' do
|
|
150
|
+
let(:api_version) { 'v4' }
|
|
188
151
|
|
|
189
|
-
|
|
152
|
+
it 'deactivates a domain key' do
|
|
153
|
+
result = mg_obj.deactivate_domain_key(
|
|
154
|
+
domain,
|
|
155
|
+
'tetetet'
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
expect(result['message']).to eq('domain key deactivated')
|
|
159
|
+
end
|
|
190
160
|
end
|
|
191
|
-
end
|
|
192
161
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
162
|
+
describe '#update_domain_dkim_authority' do
|
|
163
|
+
it 'updates the DKIM authority for a domain' do
|
|
164
|
+
result = mg_obj.update_domain_dkim_authority(
|
|
165
|
+
domain,
|
|
166
|
+
{
|
|
167
|
+
self: true
|
|
168
|
+
}
|
|
169
|
+
)
|
|
201
170
|
|
|
202
|
-
|
|
171
|
+
expect(result['message']).to eq('Domain DKIM authority has not been changed')
|
|
172
|
+
end
|
|
203
173
|
end
|
|
204
|
-
end
|
|
205
174
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
175
|
+
describe '#update_domain_dkim_selector' do
|
|
176
|
+
it 'updates the DKIM selector for a domain' do
|
|
177
|
+
result = mg_obj.update_domain_dkim_selector(
|
|
178
|
+
domain,
|
|
179
|
+
{
|
|
180
|
+
dkim_selector: 'mailo1'
|
|
181
|
+
}
|
|
182
|
+
)
|
|
214
183
|
|
|
215
|
-
|
|
184
|
+
expect(result['message']).to eq('DKIM selector changed')
|
|
185
|
+
end
|
|
216
186
|
end
|
|
217
187
|
end
|
|
218
188
|
|
|
219
|
-
|
|
220
|
-
|
|
189
|
+
context 'Domain::Tracking methods' do
|
|
190
|
+
# TODO add missing:
|
|
191
|
+
# get_domain_tracking_certificate
|
|
192
|
+
# regenerate_domain_tracking_certificate
|
|
193
|
+
# generate_domain_tracking_certificate
|
|
221
194
|
|
|
222
|
-
describe '#
|
|
223
|
-
it '
|
|
224
|
-
result = mg_obj.
|
|
195
|
+
describe '#get_domain_tracking_settings' do
|
|
196
|
+
it 'returns tracking settings for the defined domain' do
|
|
197
|
+
result = mg_obj.get_domain_tracking_settings(
|
|
225
198
|
domain
|
|
226
199
|
)
|
|
227
200
|
|
|
228
|
-
expect(result).to include('
|
|
229
|
-
expect(result['
|
|
201
|
+
expect(result).to include('tracking')
|
|
202
|
+
expect(result['tracking']['click']['active']).to eq(false)
|
|
230
203
|
end
|
|
231
204
|
end
|
|
232
205
|
|
|
233
|
-
describe '#
|
|
234
|
-
it '
|
|
206
|
+
describe '#update_domain_tracking_click_settings' do
|
|
207
|
+
it 'updates the specified tracking click settings' do
|
|
208
|
+
result = mg_obj.update_domain_tracking_click_settings(
|
|
209
|
+
domain,
|
|
210
|
+
{
|
|
211
|
+
active: false
|
|
212
|
+
}
|
|
213
|
+
)
|
|
235
214
|
|
|
236
|
-
result
|
|
215
|
+
expect(result['click']['active']).to eq(false)
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
describe '#update_domain_tracking_open_settings' do
|
|
220
|
+
it 'updates the specified tracking open settings' do
|
|
221
|
+
result = mg_obj.update_domain_tracking_open_settings(
|
|
237
222
|
domain,
|
|
238
|
-
|
|
223
|
+
{
|
|
224
|
+
active: false
|
|
225
|
+
}
|
|
239
226
|
)
|
|
240
227
|
|
|
241
|
-
|
|
228
|
+
expect(result['open']['active']).to eq(false)
|
|
242
229
|
end
|
|
243
230
|
end
|
|
244
231
|
|
|
245
|
-
describe '#
|
|
246
|
-
it '
|
|
247
|
-
result = mg_obj.
|
|
232
|
+
describe '#update_domain_tracking_unsubscribe_settings' do
|
|
233
|
+
it 'updates the specified tracking unsubscribe settings' do
|
|
234
|
+
result = mg_obj.update_domain_tracking_unsubscribe_settings(
|
|
248
235
|
domain,
|
|
249
|
-
|
|
236
|
+
{
|
|
237
|
+
active: false
|
|
238
|
+
}
|
|
250
239
|
)
|
|
251
240
|
|
|
252
|
-
|
|
241
|
+
expect(result['unsubscribe']['active']).to eq(false)
|
|
253
242
|
end
|
|
254
243
|
end
|
|
255
244
|
end
|
|
256
245
|
|
|
257
|
-
|
|
258
|
-
|
|
246
|
+
context 'Domain::DKIM_Security methods' do
|
|
247
|
+
# TODO add missing:
|
|
248
|
+
# dkim_rotation
|
|
249
|
+
# dkim_rotate
|
|
250
|
+
end
|
|
259
251
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
{
|
|
263
|
-
signing_domain: domain,
|
|
264
|
-
selector: 'test'
|
|
265
|
-
}
|
|
266
|
-
)
|
|
252
|
+
context 'Credentials methods' do
|
|
253
|
+
# TODO: to be moved to the dedicated module
|
|
267
254
|
|
|
268
|
-
|
|
255
|
+
describe '#create_smtp_credentials' do
|
|
256
|
+
it 'creates smtp credentials for domain' do
|
|
257
|
+
result = mg_obj.create_smtp_credentials(
|
|
258
|
+
domain,
|
|
259
|
+
{
|
|
260
|
+
login: 'test_login'
|
|
261
|
+
}
|
|
262
|
+
)
|
|
263
|
+
|
|
264
|
+
expect(result['message']).to eq("Created 1 credentials pair(s)")
|
|
265
|
+
end
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
describe '#update_smtp_credentials' do
|
|
269
|
+
it 'updates smtp credentials for domain' do
|
|
270
|
+
result = mg_obj.update_smtp_credentials(
|
|
271
|
+
domain,
|
|
272
|
+
'test_login',
|
|
273
|
+
{
|
|
274
|
+
spec: 'abc'
|
|
275
|
+
}
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
expect(result['message']).to eq('Password changed')
|
|
279
|
+
end
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
describe '#delete_smtp_credentials' do
|
|
283
|
+
it 'deletes smtp credentials for domain' do
|
|
284
|
+
result = mg_obj.delete_smtp_credentials(
|
|
285
|
+
domain,
|
|
286
|
+
'test_login'
|
|
287
|
+
)
|
|
288
|
+
|
|
289
|
+
expect(result['message']).to eq('Credentials have been deleted')
|
|
290
|
+
end
|
|
269
291
|
end
|
|
270
292
|
end
|
|
271
293
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
294
|
+
context 'Reporting::Stat methods' do
|
|
295
|
+
# TODO: to be moved to the dedicated module
|
|
296
|
+
|
|
297
|
+
describe '#get_domain_stats' do
|
|
298
|
+
it 'returns total stats for a given domain' do
|
|
299
|
+
result = mg_obj.get_domain_stats(
|
|
300
|
+
domain,
|
|
301
|
+
{
|
|
302
|
+
event: 'clicked'
|
|
303
|
+
}
|
|
304
|
+
)
|
|
280
305
|
|
|
281
|
-
|
|
306
|
+
expect(result).to include('stats')
|
|
307
|
+
end
|
|
282
308
|
end
|
|
283
309
|
end
|
|
284
310
|
|
data/spec/spec_helper.rb
CHANGED
data/vcr_cassettes/domains.yml
CHANGED
|
@@ -1088,4 +1088,156 @@ http_interactions:
|
|
|
1088
1088
|
'
|
|
1089
1089
|
http_version:
|
|
1090
1090
|
recorded_at: Thu, 28 Aug 2025 14:47:08 GMT
|
|
1091
|
+
- request:
|
|
1092
|
+
method: put
|
|
1093
|
+
uri: https://api.mailgun.net/v4/domains/integration-test.domain.invalid/verify
|
|
1094
|
+
body:
|
|
1095
|
+
encoding: UTF-8
|
|
1096
|
+
string: ''
|
|
1097
|
+
headers:
|
|
1098
|
+
User-Agent:
|
|
1099
|
+
- mailgun-sdk-ruby/1.4.0
|
|
1100
|
+
Accept:
|
|
1101
|
+
- "*/*"
|
|
1102
|
+
Authorization:
|
|
1103
|
+
- Basic xxx
|
|
1104
|
+
Content-Length:
|
|
1105
|
+
- '0'
|
|
1106
|
+
Accept-Encoding:
|
|
1107
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
1108
|
+
response:
|
|
1109
|
+
status:
|
|
1110
|
+
code: 200
|
|
1111
|
+
message: OK
|
|
1112
|
+
headers:
|
|
1113
|
+
Access-Control-Allow-Credentials:
|
|
1114
|
+
- 'true'
|
|
1115
|
+
Access-Control-Allow-Origin:
|
|
1116
|
+
- "*"
|
|
1117
|
+
Cache-Control:
|
|
1118
|
+
- no-store
|
|
1119
|
+
Content-Length:
|
|
1120
|
+
- '1752'
|
|
1121
|
+
Content-Type:
|
|
1122
|
+
- application/json; charset=utf-8
|
|
1123
|
+
Date:
|
|
1124
|
+
- Sat, 27 Dec 2025 23:47:46 GMT
|
|
1125
|
+
Strict-Transport-Security:
|
|
1126
|
+
- max-age=63072000; includeSubDomains
|
|
1127
|
+
X-Mailgun-Key-Id:
|
|
1128
|
+
- xxx
|
|
1129
|
+
X-Request-Limit:
|
|
1130
|
+
- '10'
|
|
1131
|
+
X-Request-Remaining:
|
|
1132
|
+
- '9'
|
|
1133
|
+
X-Request-Reset:
|
|
1134
|
+
- '1766879267069'
|
|
1135
|
+
X-Xss-Protection:
|
|
1136
|
+
- 1; mode=block
|
|
1137
|
+
body:
|
|
1138
|
+
encoding: UTF-8
|
|
1139
|
+
string: '{"message":"Domain DNS records have been updated","domain":{"created_at":"Thu,
|
|
1140
|
+
27 Nov 2025 22:42:06 GMT","id":"xxx","is_disabled":false,"name":"integration-test.domain.invalid","require_tls":false,"skip_verification":false,"smtp_login":"","spam_action":"tag","state":"unverified","type":"custom","use_automatic_sender_security":false,"web_prefix":"email","web_scheme":"http","wildcard":false,"encrypt_incoming_message":false,"message_ttl":0},"sending_dns_records":[{"is_active":false,"cached":[],"name":"k1._domainkey.integration-test.domain.invalid","record_type":"TXT","valid":"unknown","value":"k=rsa;
|
|
1141
|
+
p=xxx+xxx+xxx"},{"is_active":false,"cached":[],"name":"string._domainkey.integration-test.domain.invalid","record_type":"TXT","valid":"unknown","value":"k=rsa;
|
|
1142
|
+
p=xxx/xxx+xx+xxx+xxx+xxx/xxx/xxx"},{"is_active":true,"cached":[],"name":"integration-test.domain.invalid","record_type":"TXT","valid":"unknown","value":"v=spf1
|
|
1143
|
+
include:mailgun.org ~all"},{"is_active":true,"cached":[],"name":"email.integration-test.domain.invalid","record_type":"CNAME","valid":"unknown","value":"mailgun.org"}],"receiving_dns_records":[{"is_active":true,"cached":[],"priority":"10","record_type":"MX","valid":"unknown","value":"mxa.mailgun.org"},{"is_active":true,"cached":[],"priority":"10","record_type":"MX","valid":"unknown","value":"mxb.mailgun.org"}]}
|
|
1144
|
+
|
|
1145
|
+
'
|
|
1146
|
+
http_version:
|
|
1147
|
+
recorded_at: Sat, 27 Dec 2025 23:47:46 GMT
|
|
1148
|
+
- request:
|
|
1149
|
+
method: post
|
|
1150
|
+
uri: https://api.mailgun.net/v1/dkim/keys
|
|
1151
|
+
body:
|
|
1152
|
+
encoding: UTF-8
|
|
1153
|
+
string: selector=test&signing_domain=integration-test.domain.invalid
|
|
1154
|
+
headers:
|
|
1155
|
+
User-Agent:
|
|
1156
|
+
- mailgun-sdk-ruby/1.4.0
|
|
1157
|
+
Accept:
|
|
1158
|
+
- "*/*"
|
|
1159
|
+
Authorization:
|
|
1160
|
+
- Basic xxx
|
|
1161
|
+
Content-Type:
|
|
1162
|
+
- application/x-www-form-urlencoded
|
|
1163
|
+
Accept-Encoding:
|
|
1164
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
1165
|
+
response:
|
|
1166
|
+
status:
|
|
1167
|
+
code: 200
|
|
1168
|
+
message: OK
|
|
1169
|
+
headers:
|
|
1170
|
+
Access-Control-Allow-Credentials:
|
|
1171
|
+
- 'true'
|
|
1172
|
+
Access-Control-Allow-Origin:
|
|
1173
|
+
- "*"
|
|
1174
|
+
Cache-Control:
|
|
1175
|
+
- no-store
|
|
1176
|
+
Content-Length:
|
|
1177
|
+
- '447'
|
|
1178
|
+
Content-Type:
|
|
1179
|
+
- application/json; charset=utf-8
|
|
1180
|
+
Date:
|
|
1181
|
+
- Sun, 28 Dec 2025 00:07:03 GMT
|
|
1182
|
+
Strict-Transport-Security:
|
|
1183
|
+
- max-age=63072000; includeSubDomains
|
|
1184
|
+
X-Mailgun-Key-Id:
|
|
1185
|
+
- xxx
|
|
1186
|
+
X-Xss-Protection:
|
|
1187
|
+
- 1; mode=block
|
|
1188
|
+
body:
|
|
1189
|
+
encoding: UTF-8
|
|
1190
|
+
string: '{"signing_domain":"integration-test.domain.invalid","selector":"test","dns_record":{"is_active":false,"cached":[],"name":"test._domainkey.integration-test.domain.invalid","record_type":"TXT","valid":"unknown","value":"k=rsa;
|
|
1191
|
+
p=xxx"}}
|
|
1192
|
+
|
|
1193
|
+
'
|
|
1194
|
+
http_version:
|
|
1195
|
+
recorded_at: Sun, 28 Dec 2025 00:07:03 GMT
|
|
1196
|
+
- request:
|
|
1197
|
+
method: get
|
|
1198
|
+
uri: https://api.mailgun.net/v1/dkim/keys?signing_domain=integration-test.domain.invalid
|
|
1199
|
+
body:
|
|
1200
|
+
encoding: US-ASCII
|
|
1201
|
+
string: ''
|
|
1202
|
+
headers:
|
|
1203
|
+
User-Agent:
|
|
1204
|
+
- mailgun-sdk-ruby/1.4.0
|
|
1205
|
+
Accept:
|
|
1206
|
+
- "*/*"
|
|
1207
|
+
Authorization:
|
|
1208
|
+
- Basic xxx
|
|
1209
|
+
Accept-Encoding:
|
|
1210
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
1211
|
+
response:
|
|
1212
|
+
status:
|
|
1213
|
+
code: 200
|
|
1214
|
+
message: OK
|
|
1215
|
+
headers:
|
|
1216
|
+
Access-Control-Allow-Credentials:
|
|
1217
|
+
- 'true'
|
|
1218
|
+
Access-Control-Allow-Origin:
|
|
1219
|
+
- "*"
|
|
1220
|
+
Cache-Control:
|
|
1221
|
+
- no-store
|
|
1222
|
+
Content-Length:
|
|
1223
|
+
- '1767'
|
|
1224
|
+
Content-Type:
|
|
1225
|
+
- application/json; charset=utf-8
|
|
1226
|
+
Date:
|
|
1227
|
+
- Sun, 28 Dec 2025 00:12:23 GMT
|
|
1228
|
+
Strict-Transport-Security:
|
|
1229
|
+
- max-age=63072000; includeSubDomains
|
|
1230
|
+
X-Mailgun-Key-Id:
|
|
1231
|
+
- xxx
|
|
1232
|
+
X-Xss-Protection:
|
|
1233
|
+
- 1; mode=block
|
|
1234
|
+
body:
|
|
1235
|
+
encoding: UTF-8
|
|
1236
|
+
string: '{"items":[{"signing_domain":"integration-test.domain.invalid","selector":"k1","dns_record":{"is_active":false,"cached":[],"name":"k1._domainkey.integration-test.domain.invalid","record_type":"TXT","valid":"unknown","value":"k=rsa;
|
|
1237
|
+
p=xxx"}},{"signing_domain":"integration-test.domain.invalid","selector":"test","dns_record":{"is_active":false,"cached":[],"name":"test._domainkey.integration-test.domain.invalid","record_type":"TXT","valid":"unknown","value":"k=rsa;
|
|
1238
|
+
p=xxx"}}],"paging":{"previous":"https://api.mailgun.net/v1/dkim/keys?page=xxx","first":"https://api.mailgun.net/v1/dkim/keys?page=xxx","next":"https://api.mailgun.net/v1/dkim/keys?page=xxx","last":"https://api.mailgun.net/v1/dkim/keys?page=xxx"}}
|
|
1239
|
+
|
|
1240
|
+
'
|
|
1241
|
+
http_version:
|
|
1242
|
+
recorded_at: Sun, 28 Dec 2025 00:12:23 GMT
|
|
1091
1243
|
recorded_with: VCR 3.0.3
|