Phu Pham
Phu Pham

Reputation: 11

How to validate email is real or fake in Rails?

I have a problem I need write validator in rails to checking an email is real or fake? I try to research but nothing. Can someone help me? Thanks !

Upvotes: 0

Views: 1041

Answers (4)

Boris
Boris

Reputation: 557

Use https://github.com/OpenGems/rails_email_checker

Checks MX records, sub address, regex, whitelisted and blacklisted check

Upvotes: 0

Atul Shukla
Atul Shukla

Reputation: 171

You have two option: 1. Best one is You can send a confirmation mail to user to confirm its genuine user or not?

  1. Use gem 'email_validator' , require: 'email_validator/strict' to validate email

Upvotes: 0

puneet18
puneet18

Reputation: 4427

Use 2-factor email authentication method.

Send email to user email address and verify it.

Its the best method to validate email.

Upvotes: 2

Quan Nguyen
Quan Nguyen

Reputation: 24

you can use ruby gem to handle for checking email is real or fake. Awesome, it support validate for model.

https://github.com/minhquan4080/email_detected

Upvotes: 0

Related Questions