mail_box_validator 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mail_box_validator/mail_box.rb +2 -2
- data/lib/mail_box_validator/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3662097278f7804b3b30d8469ebab96c3826126
|
4
|
+
data.tar.gz: e1d4b4c60a1066d2a70a7d1f0dc585bb15765117
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97c5b2719c8d266117324739587afe145f366af1b4dcbc17787bfaea5e30b4eca038b2a85e17f39d7404e91316d43c5c00b6551753a4764b9e354db02a497e13
|
7
|
+
data.tar.gz: b657ceb096350d2e65eaccc3b1d31811bb86cd5806d28dcc7f75ca0c1414254255ef8cd23fbd1e6adc413c09d966d3a0c97028a70522ca6a7b2e9658af13f15f
|
@@ -7,12 +7,12 @@ module MailBoxValidator
|
|
7
7
|
def valid?(mail_address)
|
8
8
|
domain = mail_address.slice(/@(.*)/, 1)
|
9
9
|
mx = mail_exchanger_record_for(domain)
|
10
|
-
mx.present? && mx.all?(&return_valid?)
|
10
|
+
mx.present? && mx.all?(&return_valid?(mail_address))
|
11
11
|
end
|
12
12
|
|
13
13
|
private
|
14
14
|
|
15
|
-
def return_valid?
|
15
|
+
def return_valid?(mail_address)
|
16
16
|
Proc.new do |host|
|
17
17
|
response_for(mail_address, host).match(/^2\d{2}/).present?
|
18
18
|
end
|