Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to check for disposable domain without MX server check #141

Merged
merged 3 commits into from
Dec 3, 2019

Conversation

pdoulatshahi
Copy link
Contributor

Users may want the ability to only check for a disposable domain, without an additional check for the MX server - there's a trade off between the value of the extra check for the MX server and the time saved by not making that check (because of the call to the DNS resolver).

Currently, you can only get this functionality by doing something like this:

a = ValidEmail2::Address.new(address)
disposable_domain = a.valid? && a.send(:domain_is_in?, ValidEmail2.disposable_emails)

My proposed PR would keep the disposable? method but also have separate methods for disposable_domain? and disposable_mx_server?. You can also pass in disposable_domain: true into the options hash if you don't want to check the mx_server during the disposable check.

@micke micke self-requested a review November 30, 2019 00:46
@micke micke merged commit f47d81d into micke:master Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants