wj-mailgun-ruby 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +23 -0
- data/.rubocop.yml +8 -0
- data/.rubocop_todo.yml +22 -0
- data/.ruby-env.yml.example +12 -0
- data/.ruby-version +1 -0
- data/.travis.yml +24 -0
- data/Gemfile +6 -0
- data/LICENSE +191 -0
- data/README.md +241 -0
- data/Rakefile +35 -0
- data/docs/Domains.md +54 -0
- data/docs/Events.md +46 -0
- data/docs/MessageBuilder.md +105 -0
- data/docs/Messages.md +107 -0
- data/docs/OptInHandler.md +103 -0
- data/docs/Snippets.md +526 -0
- data/docs/Suppressions.md +82 -0
- data/docs/Webhooks.md +40 -0
- data/lib/mailgun-ruby.rb +2 -0
- data/lib/mailgun.rb +39 -0
- data/lib/mailgun/address.rb +45 -0
- data/lib/mailgun/chains.rb +16 -0
- data/lib/mailgun/client.rb +199 -0
- data/lib/mailgun/domains/domains.rb +84 -0
- data/lib/mailgun/events/events.rb +120 -0
- data/lib/mailgun/exceptions/exceptions.rb +65 -0
- data/lib/mailgun/lists/opt_in_handler.rb +58 -0
- data/lib/mailgun/messages/batch_message.rb +125 -0
- data/lib/mailgun/messages/message_builder.rb +413 -0
- data/lib/mailgun/response.rb +62 -0
- data/lib/mailgun/suppressions.rb +270 -0
- data/lib/mailgun/version.rb +4 -0
- data/lib/mailgun/webhooks/webhooks.rb +101 -0
- data/lib/railgun.rb +8 -0
- data/lib/railgun/attachment.rb +56 -0
- data/lib/railgun/errors.rb +27 -0
- data/lib/railgun/mailer.rb +161 -0
- data/lib/railgun/message.rb +17 -0
- data/lib/railgun/railtie.rb +9 -0
- data/mailgun.gemspec +37 -0
- data/spec/integration/bounces_spec.rb +44 -0
- data/spec/integration/campaign_spec.rb +60 -0
- data/spec/integration/complaints_spec.rb +38 -0
- data/spec/integration/domains_spec.rb +39 -0
- data/spec/integration/email_validation_spec.rb +57 -0
- data/spec/integration/events_spec.rb +28 -0
- data/spec/integration/list_members_spec.rb +63 -0
- data/spec/integration/list_spec.rb +58 -0
- data/spec/integration/mailgun_spec.rb +121 -0
- data/spec/integration/messages/sample_data/mime.txt +38 -0
- data/spec/integration/routes_spec.rb +74 -0
- data/spec/integration/stats_spec.rb +15 -0
- data/spec/integration/suppressions_spec.rb +126 -0
- data/spec/integration/unsubscribes_spec.rb +42 -0
- data/spec/integration/webhook_spec.rb +54 -0
- data/spec/spec_helper.rb +45 -0
- data/spec/unit/connection/test_client.rb +99 -0
- data/spec/unit/events/events_spec.rb +50 -0
- data/spec/unit/lists/opt_in_handler_spec.rb +24 -0
- data/spec/unit/mailgun_spec.rb +127 -0
- data/spec/unit/messages/batch_message_spec.rb +131 -0
- data/spec/unit/messages/message_builder_spec.rb +584 -0
- data/spec/unit/messages/sample_data/mailgun_icon.png +0 -0
- data/spec/unit/messages/sample_data/mime.txt +38 -0
- data/spec/unit/messages/sample_data/rackspace_logo.jpg +0 -0
- data/vcr_cassettes/bounces.yml +175 -0
- data/vcr_cassettes/complaints.yml +175 -0
- data/vcr_cassettes/domains.todo.yml +42 -0
- data/vcr_cassettes/domains.yml +360 -0
- data/vcr_cassettes/email_validation.yml +167 -0
- data/vcr_cassettes/events.yml +108 -0
- data/vcr_cassettes/exceptions.yml +45 -0
- data/vcr_cassettes/list_members.yml +320 -0
- data/vcr_cassettes/mailing_list.todo.yml +43 -0
- data/vcr_cassettes/mailing_list.yml +390 -0
- data/vcr_cassettes/routes.yml +359 -0
- data/vcr_cassettes/send_message.yml +107 -0
- data/vcr_cassettes/stats.yml +44 -0
- data/vcr_cassettes/suppressions.yml +676 -0
- data/vcr_cassettes/unsubscribes.yml +191 -0
- data/vcr_cassettes/webhooks.yml +276 -0
- metadata +263 -0
Binary file
|
@@ -0,0 +1,38 @@
|
|
1
|
+
X-SBRS: 5.6
|
2
|
+
X-SenderGroup: WHITELIST
|
3
|
+
X-MailFlowPolicy: $TRUSTED
|
4
|
+
DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=trstx.com; q=dns/txt; s=mx;
|
5
|
+
t=1381182797; h=Mime-Version: Content-Type: Subject: From: To:
|
6
|
+
Message-Id: Date: Sender: Content-Transfer-Encoding;
|
7
|
+
bh=r6P1omjKL3m7gDuZC6dZEJU6trgWm1IRwAJb8h4wtfg=; b=UPFaFGiuDx2yZjCmiMEji0fIXvGMNwXUsuaX4Ss9p5EUkqE25eYjeJaJZ5w5FK+t0jsUPZqu
|
8
|
+
FIH6sftQv7GBEbSktY6sv7dgv5q2yVlY8YNG7CXvUZdWmvwfQVvfL9j1RHJo9H3QpXT9c8bZ
|
9
|
+
p9rpYmqZtZEz2ZesPj4kzUaB0lU=
|
10
|
+
DomainKey-Signature: a=rsa-sha1; c=nofws; d=trstx.com; s=mx; q=dns;
|
11
|
+
h=Mime-Version: Content-Type: Subject: From: To: Message-Id: Date:
|
12
|
+
Sender: Content-Transfer-Encoding;
|
13
|
+
b=QUYQf9OP16DphNAjeF95+G7V6DaqL4FA+m1sjIEWHdLzrGTQkiYTpzJdne3lzSypB0DwaG
|
14
|
+
AT9zOhjjN64DWFOkJD2Ce5t6vfHa/GC3FCUMq3xz/Big94g+kOciawkHyUhCrmPyh/D7kWx1
|
15
|
+
J75UIAdmE9XQ9bCSPhZ2MRaOv7b8c=
|
16
|
+
Received: by luna.mailgun.net with HTTP; Mon, 07 Oct 2013 21:53:16 +0000
|
17
|
+
Content-Type: text/plain; charset="ascii"
|
18
|
+
Subject: Test Subject
|
19
|
+
From: <joe@example.com>
|
20
|
+
To: <bob@sample.com>
|
21
|
+
Message-ID: <20131007215316.27052.7818@example.com>
|
22
|
+
X-Mailgun-Sid: WyI4MzY1OSIsICJ0cmF2aXMuc3dpZW50ZWtAcmFja3NwYWasdfewNvbSIsICJjZjQ4Il0=
|
23
|
+
Date: Mon, 7 Oct 2013 21:53:17 +0000
|
24
|
+
Sender: <joe@example.com>
|
25
|
+
Content-Transfer-Encoding: 7bit
|
26
|
+
MIME-Version: 1.0
|
27
|
+
|
28
|
+
--3a8c26e9f23c4ac193606295aa17fa6f
|
29
|
+
Content-Type: text/plain; charset="ascii"
|
30
|
+
Content-Transfer-Encoding: 7bit
|
31
|
+
|
32
|
+
Testing some Mailgun awesomness!
|
33
|
+
--3a8c26e9f23c4ac193606295aa17fa6f
|
34
|
+
Content-Type: text/html; charset="ascii"
|
35
|
+
Content-Transfer-Encoding: 7bit
|
36
|
+
|
37
|
+
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">Test
|
38
|
+
--3a8c26e9f23c4ac193606295aa17fa6f--
|
Binary file
|
@@ -0,0 +1,175 @@
|
|
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: US-ASCII
|
8
|
+
string: address=integration-test-email%40DOMAIN.TEST&code=550&error=Integration%20Test
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- "*/*; q=0.5, application/xml"
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
Content-Length:
|
15
|
+
- '113'
|
16
|
+
Content-Type:
|
17
|
+
- application/x-www-form-urlencoded
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx
|
27
|
+
Date:
|
28
|
+
- Fri, 08 Jan 2016 20:33:28 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Content-Length:
|
32
|
+
- '139'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Access-Control-Allow-Origin:
|
36
|
+
- "*"
|
37
|
+
Access-Control-Max-Age:
|
38
|
+
- '600'
|
39
|
+
Access-Control-Allow-Methods:
|
40
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
41
|
+
Access-Control-Allow-Headers:
|
42
|
+
- Content-Type, x-requested-with
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: '{"address":"integration-test-email@DOMAIN.TEST","message":"Address
|
46
|
+
has been added to the bounces table"}'
|
47
|
+
http_version:
|
48
|
+
recorded_at: Fri, 08 Jan 2016 20:33:29 GMT
|
49
|
+
- request:
|
50
|
+
method: get
|
51
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/bounces/integration-test-email@DOMAIN.TEST
|
52
|
+
body:
|
53
|
+
encoding: US-ASCII
|
54
|
+
string: ''
|
55
|
+
headers:
|
56
|
+
Accept:
|
57
|
+
- "*/*"
|
58
|
+
Accept-Encoding:
|
59
|
+
- gzip, deflate
|
60
|
+
User-Agent:
|
61
|
+
- Ruby
|
62
|
+
response:
|
63
|
+
status:
|
64
|
+
code: 200
|
65
|
+
message: OK
|
66
|
+
headers:
|
67
|
+
Server:
|
68
|
+
- nginx
|
69
|
+
Date:
|
70
|
+
- Fri, 08 Jan 2016 20:33:28 GMT
|
71
|
+
Content-Type:
|
72
|
+
- application/json; charset=utf-8
|
73
|
+
Content-Length:
|
74
|
+
- '168'
|
75
|
+
Connection:
|
76
|
+
- keep-alive
|
77
|
+
Access-Control-Allow-Origin:
|
78
|
+
- "*"
|
79
|
+
Access-Control-Max-Age:
|
80
|
+
- '600'
|
81
|
+
Access-Control-Allow-Methods:
|
82
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
83
|
+
Access-Control-Allow-Headers:
|
84
|
+
- Content-Type, x-requested-with
|
85
|
+
body:
|
86
|
+
encoding: UTF-8
|
87
|
+
string: '{"address":"integration-test-email@DOMAIN.TEST","code":"550","error":"Integration
|
88
|
+
Test","created_at":"Fri, 08 Jan 2016 20:33:28 UTC"}'
|
89
|
+
http_version:
|
90
|
+
recorded_at: Fri, 08 Jan 2016 20:33:29 GMT
|
91
|
+
- request:
|
92
|
+
method: get
|
93
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/bounces
|
94
|
+
body:
|
95
|
+
encoding: US-ASCII
|
96
|
+
string: ''
|
97
|
+
headers:
|
98
|
+
Accept:
|
99
|
+
- "*/*"
|
100
|
+
Accept-Encoding:
|
101
|
+
- gzip, deflate
|
102
|
+
User-Agent:
|
103
|
+
- Ruby
|
104
|
+
response:
|
105
|
+
status:
|
106
|
+
code: 200
|
107
|
+
message: OK
|
108
|
+
headers:
|
109
|
+
Server:
|
110
|
+
- nginx
|
111
|
+
Date:
|
112
|
+
- Fri, 08 Jan 2016 20:33:29 GMT
|
113
|
+
Content-Type:
|
114
|
+
- application/json; charset=utf-8
|
115
|
+
Content-Length:
|
116
|
+
- '819'
|
117
|
+
Connection:
|
118
|
+
- keep-alive
|
119
|
+
Access-Control-Allow-Origin:
|
120
|
+
- "*"
|
121
|
+
Access-Control-Max-Age:
|
122
|
+
- '600'
|
123
|
+
Access-Control-Allow-Methods:
|
124
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
125
|
+
Access-Control-Allow-Headers:
|
126
|
+
- Content-Type, x-requested-with
|
127
|
+
body:
|
128
|
+
encoding: UTF-8
|
129
|
+
string: '{"items":[{"address":"integration-test-email@DOMAIN.TEST","code":"550","error":"Integration
|
130
|
+
Test","created_at":"Fri, 08 Jan 2016 20:33:28 UTC"}],"paging":{"first":"https://api.mailgun.net/v3/DOMAIN.TEST/bounces?limit=100","last":"https://api.mailgun.net/v3/DOMAIN.TEST/bounces?page=last\u0026limit=100","next":"https://api.mailgun.net/v3/DOMAIN.TEST/bounces?page=next\u0026address=integration-test-email%40DOMAIN.TEST\u0026limit=100","previous":"https://api.mailgun.net/v3/DOMAIN.TEST/bounces?page=previous\u0026address=integration-test-email%40DOMAIN.TEST\u0026limit=100"}}'
|
131
|
+
http_version:
|
132
|
+
recorded_at: Fri, 08 Jan 2016 20:33:29 GMT
|
133
|
+
- request:
|
134
|
+
method: delete
|
135
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/bounces/integration-test-email@DOMAIN.TEST
|
136
|
+
body:
|
137
|
+
encoding: US-ASCII
|
138
|
+
string: ''
|
139
|
+
headers:
|
140
|
+
Accept:
|
141
|
+
- "*/*; q=0.5, application/xml"
|
142
|
+
Accept-Encoding:
|
143
|
+
- gzip, deflate
|
144
|
+
User-Agent:
|
145
|
+
- Ruby
|
146
|
+
response:
|
147
|
+
status:
|
148
|
+
code: 200
|
149
|
+
message: OK
|
150
|
+
headers:
|
151
|
+
Server:
|
152
|
+
- nginx
|
153
|
+
Date:
|
154
|
+
- Fri, 08 Jan 2016 20:33:29 GMT
|
155
|
+
Content-Type:
|
156
|
+
- application/json; charset=utf-8
|
157
|
+
Content-Length:
|
158
|
+
- '128'
|
159
|
+
Connection:
|
160
|
+
- keep-alive
|
161
|
+
Access-Control-Allow-Origin:
|
162
|
+
- "*"
|
163
|
+
Access-Control-Max-Age:
|
164
|
+
- '600'
|
165
|
+
Access-Control-Allow-Methods:
|
166
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
167
|
+
Access-Control-Allow-Headers:
|
168
|
+
- Content-Type, x-requested-with
|
169
|
+
body:
|
170
|
+
encoding: UTF-8
|
171
|
+
string: '{"address":"integration-test-email@DOMAIN.TEST","message":"Bounced
|
172
|
+
address has been removed"}'
|
173
|
+
http_version:
|
174
|
+
recorded_at: Fri, 08 Jan 2016 20:33:30 GMT
|
175
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,175 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/complaints
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: address=integration-test-email%40DOMAIN.TEST
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- "*/*; q=0.5, application/xml"
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
Content-Length:
|
15
|
+
- '79'
|
16
|
+
Content-Type:
|
17
|
+
- application/x-www-form-urlencoded
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx
|
27
|
+
Date:
|
28
|
+
- Fri, 08 Jan 2016 20:31:59 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Content-Length:
|
32
|
+
- '142'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Access-Control-Allow-Origin:
|
36
|
+
- "*"
|
37
|
+
Access-Control-Max-Age:
|
38
|
+
- '600'
|
39
|
+
Access-Control-Allow-Methods:
|
40
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
41
|
+
Access-Control-Allow-Headers:
|
42
|
+
- Content-Type, x-requested-with
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: '{"address":"integration-test-email@DOMAIN.TEST","message":"Address
|
46
|
+
has been added to the complaints table"}'
|
47
|
+
http_version:
|
48
|
+
recorded_at: Fri, 08 Jan 2016 20:31:59 GMT
|
49
|
+
- request:
|
50
|
+
method: get
|
51
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/complaints/integration-test-email@DOMAIN.TEST
|
52
|
+
body:
|
53
|
+
encoding: US-ASCII
|
54
|
+
string: ''
|
55
|
+
headers:
|
56
|
+
Accept:
|
57
|
+
- "*/*"
|
58
|
+
Accept-Encoding:
|
59
|
+
- gzip, deflate
|
60
|
+
User-Agent:
|
61
|
+
- Ruby
|
62
|
+
response:
|
63
|
+
status:
|
64
|
+
code: 200
|
65
|
+
message: OK
|
66
|
+
headers:
|
67
|
+
Server:
|
68
|
+
- nginx
|
69
|
+
Date:
|
70
|
+
- Fri, 08 Jan 2016 20:31:59 GMT
|
71
|
+
Content-Type:
|
72
|
+
- application/json; charset=utf-8
|
73
|
+
Content-Length:
|
74
|
+
- '128'
|
75
|
+
Connection:
|
76
|
+
- keep-alive
|
77
|
+
Access-Control-Allow-Origin:
|
78
|
+
- "*"
|
79
|
+
Access-Control-Max-Age:
|
80
|
+
- '600'
|
81
|
+
Access-Control-Allow-Methods:
|
82
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
83
|
+
Access-Control-Allow-Headers:
|
84
|
+
- Content-Type, x-requested-with
|
85
|
+
body:
|
86
|
+
encoding: UTF-8
|
87
|
+
string: '{"address":"integration-test-email@DOMAIN.TEST","created_at":"Fri,
|
88
|
+
08 Jan 2016 20:31:59 UTC"}'
|
89
|
+
http_version:
|
90
|
+
recorded_at: Fri, 08 Jan 2016 20:32:00 GMT
|
91
|
+
- request:
|
92
|
+
method: get
|
93
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/complaints
|
94
|
+
body:
|
95
|
+
encoding: US-ASCII
|
96
|
+
string: ''
|
97
|
+
headers:
|
98
|
+
Accept:
|
99
|
+
- "*/*"
|
100
|
+
Accept-Encoding:
|
101
|
+
- gzip, deflate
|
102
|
+
User-Agent:
|
103
|
+
- Ruby
|
104
|
+
response:
|
105
|
+
status:
|
106
|
+
code: 200
|
107
|
+
message: OK
|
108
|
+
headers:
|
109
|
+
Server:
|
110
|
+
- nginx
|
111
|
+
Date:
|
112
|
+
- Fri, 08 Jan 2016 20:31:59 GMT
|
113
|
+
Content-Type:
|
114
|
+
- application/json; charset=utf-8
|
115
|
+
Content-Length:
|
116
|
+
- '791'
|
117
|
+
Connection:
|
118
|
+
- keep-alive
|
119
|
+
Access-Control-Allow-Origin:
|
120
|
+
- "*"
|
121
|
+
Access-Control-Max-Age:
|
122
|
+
- '600'
|
123
|
+
Access-Control-Allow-Methods:
|
124
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
125
|
+
Access-Control-Allow-Headers:
|
126
|
+
- Content-Type, x-requested-with
|
127
|
+
body:
|
128
|
+
encoding: UTF-8
|
129
|
+
string: '{"items":[{"address":"integration-test-email@DOMAIN.TEST","created_at":"Fri,
|
130
|
+
08 Jan 2016 20:31:59 UTC"}],"paging":{"first":"https://api.mailgun.net/v3/DOMAIN.TEST/complaints?limit=100","last":"https://api.mailgun.net/v3/DOMAIN.TEST/complaints?page=last\u0026limit=100","next":"https://api.mailgun.net/v3/DOMAIN.TEST/complaints?page=next\u0026address=integration-test-email%40DOMAIN.TEST\u0026limit=100","previous":"https://api.mailgun.net/v3/DOMAIN.TEST/complaints?page=previous\u0026address=integration-test-email%40DOMAIN.TEST\u0026limit=100"}}'
|
131
|
+
http_version:
|
132
|
+
recorded_at: Fri, 08 Jan 2016 20:32:00 GMT
|
133
|
+
- request:
|
134
|
+
method: delete
|
135
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/DOMAIN.TEST/complaints/integration-test-email@DOMAIN.TEST
|
136
|
+
body:
|
137
|
+
encoding: US-ASCII
|
138
|
+
string: ''
|
139
|
+
headers:
|
140
|
+
Accept:
|
141
|
+
- "*/*; q=0.5, application/xml"
|
142
|
+
Accept-Encoding:
|
143
|
+
- gzip, deflate
|
144
|
+
User-Agent:
|
145
|
+
- Ruby
|
146
|
+
response:
|
147
|
+
status:
|
148
|
+
code: 200
|
149
|
+
message: OK
|
150
|
+
headers:
|
151
|
+
Server:
|
152
|
+
- nginx
|
153
|
+
Date:
|
154
|
+
- Fri, 08 Jan 2016 20:31:59 GMT
|
155
|
+
Content-Type:
|
156
|
+
- application/json; charset=utf-8
|
157
|
+
Content-Length:
|
158
|
+
- '127'
|
159
|
+
Connection:
|
160
|
+
- keep-alive
|
161
|
+
Access-Control-Allow-Origin:
|
162
|
+
- "*"
|
163
|
+
Access-Control-Max-Age:
|
164
|
+
- '600'
|
165
|
+
Access-Control-Allow-Methods:
|
166
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
167
|
+
Access-Control-Allow-Headers:
|
168
|
+
- Content-Type, x-requested-with
|
169
|
+
body:
|
170
|
+
encoding: UTF-8
|
171
|
+
string: '{"address":"integration-test-email@DOMAIN.TEST","message":"Spam complaint
|
172
|
+
has been removed"}'
|
173
|
+
http_version:
|
174
|
+
recorded_at: Fri, 08 Jan 2016 20:32:00 GMT
|
175
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/domains
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: name=integration-test.domain.invalid&smtp_password=super_secret&spam_action=tag
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- "*/*; q=0.5, application/xml"
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
Content-Length:
|
15
|
+
- '79'
|
16
|
+
Content-Type:
|
17
|
+
- application/x-www-form-urlencoded
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 400
|
23
|
+
message: Bad Request
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx
|
27
|
+
Date:
|
28
|
+
- Fri, 08 Jan 2016 20:34:40 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json
|
31
|
+
Content-Length:
|
32
|
+
- '52'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: |-
|
38
|
+
{
|
39
|
+
"message": "This domain name is already taken"
|
40
|
+
}
|
41
|
+
http_version:
|
42
|
+
recorded_at: Fri, 08 Jan 2016 20:34:41 GMT
|
@@ -0,0 +1,360 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/domains
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: smtp_password=super_secret&spam_action=tag&wildcard=false&name=integration-test.domain.invalid
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- "*/*; q=0.5, application/xml"
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
Content-Length:
|
15
|
+
- '94'
|
16
|
+
Content-Type:
|
17
|
+
- application/x-www-form-urlencoded
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx
|
27
|
+
Date:
|
28
|
+
- Fri, 15 Jan 2016 20:11:28 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json
|
31
|
+
Content-Length:
|
32
|
+
- '1417'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Content-Disposition:
|
36
|
+
- inline
|
37
|
+
Access-Control-Allow-Origin:
|
38
|
+
- "*"
|
39
|
+
- "*"
|
40
|
+
Access-Control-Max-Age:
|
41
|
+
- '600'
|
42
|
+
- '600'
|
43
|
+
Access-Control-Allow-Methods:
|
44
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
45
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
46
|
+
Access-Control-Allow-Headers:
|
47
|
+
- Content-Type, x-requested-with
|
48
|
+
- Content-Type, x-requested-with
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: |-
|
52
|
+
{
|
53
|
+
"domain": {
|
54
|
+
"created_at": "Fri, 15 Jan 2016 20:11:28 GMT",
|
55
|
+
"name": "integration-test.domain.invalid",
|
56
|
+
"require_tls": false,
|
57
|
+
"skip_verification": false,
|
58
|
+
"smtp_login": "postmaster@integration-test.domain.invalid",
|
59
|
+
"smtp_password": "super_secret",
|
60
|
+
"spam_action": "tag",
|
61
|
+
"state": "unverified",
|
62
|
+
"type": "custom",
|
63
|
+
"wildcard": false
|
64
|
+
},
|
65
|
+
"message": "Domain has been created",
|
66
|
+
"receiving_dns_records": [
|
67
|
+
{
|
68
|
+
"priority": "10",
|
69
|
+
"record_type": "MX",
|
70
|
+
"valid": "unknown",
|
71
|
+
"value": "mxa.mailgun.org"
|
72
|
+
},
|
73
|
+
{
|
74
|
+
"priority": "10",
|
75
|
+
"record_type": "MX",
|
76
|
+
"valid": "unknown",
|
77
|
+
"value": "mxb.mailgun.org"
|
78
|
+
}
|
79
|
+
],
|
80
|
+
"sending_dns_records": [
|
81
|
+
{
|
82
|
+
"name": "integration-test.domain.invalid",
|
83
|
+
"record_type": "TXT",
|
84
|
+
"valid": "unknown",
|
85
|
+
"value": "v=spf1 include:mailgun.org ~all"
|
86
|
+
},
|
87
|
+
{
|
88
|
+
"name": "pic._domainkey.integration-test.domain.invalid",
|
89
|
+
"record_type": "TXT",
|
90
|
+
"valid": "unknown",
|
91
|
+
"value": "k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCYHL7d9j0Y2Vzt11AQk3ZoO2tNu4E3MRJvjw4Uhw3WY2iUpM4x1pw/L+nzGFyd0NfCVLea6mafUTeTWTMIocQVZLWqtnVPONS+YkQTqo1xtcZzC7GMBEVA+VsEMAYbw57pyIu1DQVW+dnqd7cbb4POdLk3Jy75w59Mys8/9GQUNQIDAQAB"
|
92
|
+
},
|
93
|
+
{
|
94
|
+
"name": "email.integration-test.domain.invalid",
|
95
|
+
"record_type": "CNAME",
|
96
|
+
"valid": "unknown",
|
97
|
+
"value": "mailgun.org"
|
98
|
+
}
|
99
|
+
]
|
100
|
+
}
|
101
|
+
http_version:
|
102
|
+
recorded_at: Fri, 15 Jan 2016 20:11:29 GMT
|
103
|
+
- request:
|
104
|
+
method: get
|
105
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/domains/integration-test.domain.invalid
|
106
|
+
body:
|
107
|
+
encoding: US-ASCII
|
108
|
+
string: ''
|
109
|
+
headers:
|
110
|
+
Accept:
|
111
|
+
- "*/*"
|
112
|
+
Accept-Encoding:
|
113
|
+
- gzip, deflate
|
114
|
+
User-Agent:
|
115
|
+
- Ruby
|
116
|
+
response:
|
117
|
+
status:
|
118
|
+
code: 200
|
119
|
+
message: OK
|
120
|
+
headers:
|
121
|
+
Server:
|
122
|
+
- nginx
|
123
|
+
Date:
|
124
|
+
- Fri, 15 Jan 2016 20:11:29 GMT
|
125
|
+
Content-Type:
|
126
|
+
- application/json
|
127
|
+
Content-Length:
|
128
|
+
- '1377'
|
129
|
+
Connection:
|
130
|
+
- keep-alive
|
131
|
+
Content-Disposition:
|
132
|
+
- inline
|
133
|
+
Access-Control-Allow-Origin:
|
134
|
+
- "*"
|
135
|
+
- "*"
|
136
|
+
Access-Control-Max-Age:
|
137
|
+
- '600'
|
138
|
+
- '600'
|
139
|
+
Access-Control-Allow-Methods:
|
140
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
141
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
142
|
+
Access-Control-Allow-Headers:
|
143
|
+
- Content-Type, x-requested-with
|
144
|
+
- Content-Type, x-requested-with
|
145
|
+
body:
|
146
|
+
encoding: UTF-8
|
147
|
+
string: |-
|
148
|
+
{
|
149
|
+
"domain": {
|
150
|
+
"created_at": "Fri, 15 Jan 2016 20:11:28 GMT",
|
151
|
+
"name": "integration-test.domain.invalid",
|
152
|
+
"require_tls": false,
|
153
|
+
"skip_verification": false,
|
154
|
+
"smtp_login": "postmaster@integration-test.domain.invalid",
|
155
|
+
"smtp_password": "super_secret",
|
156
|
+
"spam_action": "tag",
|
157
|
+
"state": "unverified",
|
158
|
+
"type": "custom",
|
159
|
+
"wildcard": false
|
160
|
+
},
|
161
|
+
"receiving_dns_records": [
|
162
|
+
{
|
163
|
+
"priority": "10",
|
164
|
+
"record_type": "MX",
|
165
|
+
"valid": "unknown",
|
166
|
+
"value": "mxa.mailgun.org"
|
167
|
+
},
|
168
|
+
{
|
169
|
+
"priority": "10",
|
170
|
+
"record_type": "MX",
|
171
|
+
"valid": "unknown",
|
172
|
+
"value": "mxb.mailgun.org"
|
173
|
+
}
|
174
|
+
],
|
175
|
+
"sending_dns_records": [
|
176
|
+
{
|
177
|
+
"name": "integration-test.domain.invalid",
|
178
|
+
"record_type": "TXT",
|
179
|
+
"valid": "unknown",
|
180
|
+
"value": "v=spf1 include:mailgun.org ~all"
|
181
|
+
},
|
182
|
+
{
|
183
|
+
"name": "pic._domainkey.integration-test.domain.invalid",
|
184
|
+
"record_type": "TXT",
|
185
|
+
"valid": "unknown",
|
186
|
+
"value": "k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCYHL7d9j0Y2Vzt11AQk3ZoO2tNu4E3MRJvjw4Uhw3WY2iUpM4x1pw/L+nzGFyd0NfCVLea6mafUTeTWTMIocQVZLWqtnVPONS+YkQTqo1xtcZzC7GMBEVA+VsEMAYbw57pyIu1DQVW+dnqd7cbb4POdLk3Jy75w59Mys8/9GQUNQIDAQAB"
|
187
|
+
},
|
188
|
+
{
|
189
|
+
"name": "email.integration-test.domain.invalid",
|
190
|
+
"record_type": "CNAME",
|
191
|
+
"valid": "unknown",
|
192
|
+
"value": "mailgun.org"
|
193
|
+
}
|
194
|
+
]
|
195
|
+
}
|
196
|
+
http_version:
|
197
|
+
recorded_at: Fri, 15 Jan 2016 20:11:29 GMT
|
198
|
+
- request:
|
199
|
+
method: get
|
200
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/domains
|
201
|
+
body:
|
202
|
+
encoding: US-ASCII
|
203
|
+
string: ''
|
204
|
+
headers:
|
205
|
+
Accept:
|
206
|
+
- "*/*"
|
207
|
+
Accept-Encoding:
|
208
|
+
- gzip, deflate
|
209
|
+
User-Agent:
|
210
|
+
- Ruby
|
211
|
+
response:
|
212
|
+
status:
|
213
|
+
code: 200
|
214
|
+
message: OK
|
215
|
+
headers:
|
216
|
+
Server:
|
217
|
+
- nginx
|
218
|
+
Date:
|
219
|
+
- Fri, 15 Jan 2016 20:11:29 GMT
|
220
|
+
Content-Type:
|
221
|
+
- application/json
|
222
|
+
Content-Length:
|
223
|
+
- '2041'
|
224
|
+
Connection:
|
225
|
+
- keep-alive
|
226
|
+
Content-Disposition:
|
227
|
+
- inline
|
228
|
+
Access-Control-Allow-Origin:
|
229
|
+
- "*"
|
230
|
+
- "*"
|
231
|
+
Access-Control-Max-Age:
|
232
|
+
- '600'
|
233
|
+
- '600'
|
234
|
+
Access-Control-Allow-Methods:
|
235
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
236
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
237
|
+
Access-Control-Allow-Headers:
|
238
|
+
- Content-Type, x-requested-with
|
239
|
+
- Content-Type, x-requested-with
|
240
|
+
body:
|
241
|
+
encoding: UTF-8
|
242
|
+
string: |-
|
243
|
+
{
|
244
|
+
"items": [
|
245
|
+
{
|
246
|
+
"created_at": "Fri, 15 Jan 2016 20:11:28 GMT",
|
247
|
+
"name": "integration-test.domain.invalid",
|
248
|
+
"require_tls": false,
|
249
|
+
"skip_verification": false,
|
250
|
+
"smtp_login": "postmaster@integration-test.domain.invalid",
|
251
|
+
"smtp_password": "super_secret",
|
252
|
+
"spam_action": "tag",
|
253
|
+
"state": "unverified",
|
254
|
+
"type": "custom",
|
255
|
+
"wildcard": false
|
256
|
+
},
|
257
|
+
{
|
258
|
+
"created_at": "Fri, 08 Jan 2016 21:40:17 GMT",
|
259
|
+
"name": "mail.mitchellandness.com",
|
260
|
+
"require_tls": false,
|
261
|
+
"skip_verification": false,
|
262
|
+
"smtp_login": "postmaster@mail.mitchellandness.com",
|
263
|
+
"smtp_password": "33114017612439705daa4edcda233950",
|
264
|
+
"spam_action": "disabled",
|
265
|
+
"state": "active",
|
266
|
+
"type": "custom",
|
267
|
+
"wildcard": false
|
268
|
+
},
|
269
|
+
{
|
270
|
+
"created_at": "Tue, 29 Dec 2015 21:05:59 GMT",
|
271
|
+
"name": "DOMAIN.TEST",
|
272
|
+
"require_tls": false,
|
273
|
+
"skip_verification": false,
|
274
|
+
"smtp_login": "postmaster@DOMAIN.TEST",
|
275
|
+
"smtp_password": "bc68064e57238b091107c80dd61a7e6a",
|
276
|
+
"spam_action": "disabled",
|
277
|
+
"state": "active",
|
278
|
+
"type": "sandbox",
|
279
|
+
"wildcard": false
|
280
|
+
},
|
281
|
+
{
|
282
|
+
"created_at": "Mon, 14 Dec 2015 22:02:29 GMT",
|
283
|
+
"name": "mail.honingpigeon.com",
|
284
|
+
"require_tls": false,
|
285
|
+
"skip_verification": false,
|
286
|
+
"smtp_login": "postmaster@mail.honingpigeon.com",
|
287
|
+
"smtp_password": "7344e71cd355c986d6ece8218a520b88",
|
288
|
+
"spam_action": "disabled",
|
289
|
+
"state": "active",
|
290
|
+
"type": "custom",
|
291
|
+
"wildcard": false
|
292
|
+
},
|
293
|
+
{
|
294
|
+
"created_at": "Mon, 14 Sep 2015 21:34:08 GMT",
|
295
|
+
"name": "mailhive.dmipartners.com",
|
296
|
+
"require_tls": false,
|
297
|
+
"skip_verification": false,
|
298
|
+
"smtp_login": "postmaster@mailhive.dmipartners.com",
|
299
|
+
"smtp_password": "a040bcfef229efa52283224144ebc15f",
|
300
|
+
"spam_action": "disabled",
|
301
|
+
"state": "active",
|
302
|
+
"type": "custom",
|
303
|
+
"wildcard": false
|
304
|
+
}
|
305
|
+
],
|
306
|
+
"total_count": 5
|
307
|
+
}
|
308
|
+
http_version:
|
309
|
+
recorded_at: Fri, 15 Jan 2016 20:11:29 GMT
|
310
|
+
- request:
|
311
|
+
method: delete
|
312
|
+
uri: https://api:<APIKEY>@api.mailgun.net/v3/domains/integration-test.domain.invalid
|
313
|
+
body:
|
314
|
+
encoding: US-ASCII
|
315
|
+
string: ''
|
316
|
+
headers:
|
317
|
+
Accept:
|
318
|
+
- "*/*; q=0.5, application/xml"
|
319
|
+
Accept-Encoding:
|
320
|
+
- gzip, deflate
|
321
|
+
User-Agent:
|
322
|
+
- Ruby
|
323
|
+
response:
|
324
|
+
status:
|
325
|
+
code: 200
|
326
|
+
message: OK
|
327
|
+
headers:
|
328
|
+
Server:
|
329
|
+
- nginx
|
330
|
+
Date:
|
331
|
+
- Fri, 15 Jan 2016 20:12:54 GMT
|
332
|
+
Content-Type:
|
333
|
+
- application/json
|
334
|
+
Content-Length:
|
335
|
+
- '42'
|
336
|
+
Connection:
|
337
|
+
- keep-alive
|
338
|
+
Content-Disposition:
|
339
|
+
- inline
|
340
|
+
Access-Control-Allow-Origin:
|
341
|
+
- "*"
|
342
|
+
- "*"
|
343
|
+
Access-Control-Max-Age:
|
344
|
+
- '600'
|
345
|
+
- '600'
|
346
|
+
Access-Control-Allow-Methods:
|
347
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
348
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
349
|
+
Access-Control-Allow-Headers:
|
350
|
+
- Content-Type, x-requested-with
|
351
|
+
- Content-Type, x-requested-with
|
352
|
+
body:
|
353
|
+
encoding: UTF-8
|
354
|
+
string: |-
|
355
|
+
{
|
356
|
+
"message": "Domain has been deleted"
|
357
|
+
}
|
358
|
+
http_version:
|
359
|
+
recorded_at: Fri, 15 Jan 2016 20:12:54 GMT
|
360
|
+
recorded_with: VCR 3.0.1
|