truemail-rb / truemail

🚀 Configurable framework agnostic plain Ruby 📨 email validator/verifier. Verify email via Regex, DNS, SMTP and even more. Be sure that email address valid and exists.

Home Page:https://truemail-rb.org/truemail-gem

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEATURE] Fail fast behaviour for SMTP validation layer as not required configurable option

bestwebua opened this issue · comments

New feature request checklist

Feature description

This feature depends on issue #108. Implement ability to use fail fast behaviour for SMTP validation layer. It should be a configurable and not required option like in example below:

Truemail.configure do |config|
  config.smtp_fail_fast = true # by default it's equal to false
end

When smtp_fail_fast = true it means that truemail ends smtp validation session after first attempt on the first mx server in any fail cases (network connection/timeout error, smtp validation error). It should reduce total time of SMTP validation session up to 1 second.

In a latest release 🚀