Ruby Email Verification Gem
Free plan available. No credit card required.
Gem Installation
Install the EmailVerify gem using RubyGems.
gem install emailverify
Ruby Examples
1 Standard Email Verification
Elegant and idiomatic Ruby integration. Our official gem provides a clean API for performing real-time SMTP handshakes and domain analysis directly from your Ruby scripts or web applications.
require 'email_verify'
client = EmailVerify::Client.new('your_api_key')
result = client.verify('[email protected]')
puts "Deliverable!" if result.valid?
2 High-Volume Batch API
Offload large-scale verification tasks. The batch system is designed for marketing teams and developers who need to verify lists of thousands of emails without blocking their main application flow.
emails =['[email protected]', '[email protected]']
batch = client.batches.create(emails)
# Check status later
status = client.batches.get(batch.id).status
if status == 'completed'
results = client.batches.results(batch.id)
end
3 Advanced Client Setup
Configure for stability. Customize request timeouts and proxy settings to ensure the gem behaves correctly within your specific infrastructure and meets your application's latency requirements.
client = EmailVerify::Client.new(
api_key: 'your_api_key',
timeout: 5, # 5 second timeout
open_timeout: 2, # 2 second connection timeout
proxy: 'http://my-proxy.com:80'
)
4 Lead Discovery (Finder)
Boost your outreach efforts. The Finder API intelligently predicts and verifies professional email addresses, giving you a powerful tool for lead generation and business development.
lead = client.finder.search(
first_name: 'John',
last_name: 'Wick',
domain: 'continental.com'
)
puts "Email: #{lead.email} (#{lead.confidence}%)" if lead.email
5 Syntax & Typos Correction
Clean data at the point of entry. Use the syntax validation tool to catch common keyboard slips and provide real-time feedback to users, ensuring valid emails are collected every time.
check = client.syntax.validate('[email protected]')
puts "Suggested: #{check.suggestion}" if check.suggestion # [email protected]
6 Rails Integration & Sidekiq
Built for the Rails ecosystem. The gem is thread-safe and perfectly suited for background processing with Sidekiq, Resque, or ActiveJob, keeping your user experience snappy and responsive.
class VerificationWorker
include Sidekiq::Worker
def perform(user_id)
user = User.find(user_id)
res = EmailVerify.client.verify(user.email)
user.update(verified: res.valid?)
end
end
7 Detailed Exception Handling
Implement safe failovers. Every API error is raised as a specific Ruby exception class, making it easy to catch and handle different failure modes without generic 'rescue Exception' blocks.
begin
res = client.verify(email)
rescue EmailVerify::RateLimitError
# Handle 429
rescue EmailVerify::AuthError
# Handle invalid API key
rescue EmailVerify::NetworkError => e
# Handle timeouts
end
8 Comprehensive Domain Intelligence
Uncover deeper insights. Beyond just valid/invalid, get detailed metadata about the recipient domain, including ESP identification and detection of professional vs. personal accounts.
res = client.verify('[email protected]')
puts "Is Catch-all: #{res.catch_all?}"
puts "Provider: #{res.provider_name}" # Google Workspace
puts "Is Disposable: #{res.disposable?}"
Frequently Asked Questions
Is an API key required to use the Ruby SDK?
Yes, a valid API key from EmailVerify.io is required. You can obtain one by signing up for a free account on our platform.
Does the EmailVerify gem support Ruby on Rails?
Absolutely. The gem is fully compatible with Ruby on Rails. You can include it in your Gemfile and use it in models, controllers, or background jobs like Sidekiq.
How accurate is the Ruby SDK verification?
Our SDK provides 99%+ accuracy using real-time SMTP checks, MX record validation, and advanced disposable email detection algorithms.
Can I perform bulk verification with the Ruby SDK?
Yes, the SDK supports batch verification. You can submit lists of emails for background processing and check their status programmatically.
You're just one click away from clean email lists.
Start verifying your email addresses instantly and improve your campaign deliverability
* No credit card required