How to block Disposable Email Addresses in your website's registration form?

后端 未结 11 2206
天命终不由人
天命终不由人 2020-11-29 23:55

I would like to know of the possible ways to block disposable email addresses from registering in my website.

For simplicity, let\'s take the example where the regi

11条回答
  •  猫巷女王i
    2020-11-30 00:37

    Thought I would add to this answer as none was specified and it took me a while to find a solution.

    What I am using is the blacklist method where you specify a list to block. It works well as users just give up after trying the biggest disposable email providers.

    The code can be found here: How to Block Disposable Email Addresses: PHP Code

    It works by letting you create an array of domains you which to block. You then provide an email address as a variable and this gets split to get the domain. This is compared to the list and as you can see on the website you can do whatever you like if a disposable email is detected.

    Good luck!

提交回复
热议问题