lib/truemail/validate/mx.rb in truemail-0.1.2 vs lib/truemail/validate/mx.rb in truemail-0.1.3

- old
+ new

@@ -7,10 +7,10 @@ ERROR = 'mx records not found' def run return false unless Truemail::Validate::Regex.check(result) - result.domain = result.email[Truemail::RegexConstant::REGEX_EMAIL_PATTERN, 3] + result.domain = result.email[Truemail::RegexConstant::REGEX_DOMAIN_FROM_EMAIL, 1] return true if success(!result.mail_servers.push(*mx_records).empty?) add_error(Truemail::Validate::Mx::ERROR) false end