Ruby

User Contributed Ruby Wrapper(s)https://github.com/afrase/zerobounce

Ruby Configuration


  # Configure the client
  Zerobounce.configure do |config|
    config.apikey = 'key'
    config.valid_statuses = [:valid, :catch_all, :unknown]
  end
  
  resp = Zerobounce.validate(email: 'valid@example.com')
  resp.valid? # => true
  
  # Change what is considered a valid status
  Zerobounce.valid?('invalid@example.com') # => false
  Zerobounce.config.valid_statuses = [:invalid]
  Zerobounce.valid?('invalid@example.com') # => true
  
  # Use a different API key for one request
  Zerobounce.validate(email: 'valid@example.com', apikey: 'different-api-key')