What are disposable email addresses?
Users may not trust a website with their email address because they may fear that will get spammed or that their email information will be leaked to third parties. So they use a disposable email to sign up on a website and use its features without providing the website with their email address.

A popular disposable email provider (Mailinator).
The Problem
However, an issue arises. What if the website needs to contact a user? What if the user is missing out on important information and news about the things they signed up for in the first place. Hence, the need to disallow users from registering with disposable emails on these websites becomes crucial.
The Solution
Below is some PHP code that will allow you to block disposable email addresses. Not that implementation of this code will require that you have some knowledge of PHP.
The function – Store this in a file called disposablecheck.php or something similar and upload it to some directory on your website.
What this function does is split apart an email address that is provided and compare its domain to an array of well known disposable email providers. It will be necessary to update this blacklist to keep out most of the well known disposable email providers. The function will return a 1 if a disposable email is detected and a 0 if it one is not.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 |
<?php function disposablecheck($email) { $blacklist = array( "0815.ru0clickemail.com", "0wnd.net", "0wnd.org", "10minutemail.com", "20minutemail.com", "2prong.com", "3d-painting.com", "4warding.com", "4warding.net", "4warding.org", "9ox.net", "a-bc.net", "amilegit.com", "anonbox.net", "anonymbox.com", "antichef.com", "antichef.net", "antispam.de", "baxomale.ht.cx", "beefmilk.com", "binkmail.com", "bio-muesli.net", "bobmail.info", "bodhi.lawlita.com", "bofthew.com", "brefmail.com", "bsnow.net", "bugmenot.com", "bumpymail.com", "casualdx.com", "chogmail.com", "cool.fr.nf", "correo.blogos.net", "cosmorph.com", "courriel.fr.nf", "courrieltemporaire.com", "curryworld.de", "cust.in", "dacoolest.com", "dandikmail.com", "deadaddress.com", "despam.it", "devnullmail.com", "dfgh.net", "digitalsanctuary.com", "discardmail.com", "discardmail.de", "disposableaddress.com", "disposemail.com", "dispostable.com", "dm.w3internet.co.uk example.com", "dodgeit.com", "dodgit.com", "dodgit.org", "dontreg.com", "dontsendmespam.de", "dump-email.info", "dumpyemail.com", "e4ward.com", "email60.com", "emailias.com", "emailinfive.com", "emailmiser.com", "emailtemporario.com.br", "emailwarden.com", "ephemail.net", "explodemail.com", "fakeinbox.com", "fakeinformation.com", "fastacura.com", "filzmail.com", "fizmail.com", "frapmail.com", "garliclife.com", "get1mail.com", "getonemail.com", "getonemail.net", "girlsundertheinfluence.com", "gishpuppy.com", "great-host.in", "gsrv.co.uk", "guerillamail.biz", "guerillamail.com", "guerillamail.net", "guerillamail.org", "guerrillamail.com", "guerrillamailblock.com", "haltospam.com", "hotpop.com", "ieatspam.eu", "ieatspam.info", "ihateyoualot.info", "imails.info", "inboxclean.com", "inboxclean.org", "incognitomail.com", "incognitomail.net", "ipoo.org", "irish2me.com", "jetable.com", "jetable.fr.nf", "jetable.net", "jetable.org", "junk1e.com", "kaspop.com", "kulturbetrieb.info", "kurzepost.de", "lifebyfood.com", "link2mail.net", "litedrop.com", "lookugly.com", "lopl.co.cc", "lr78.com", "maboard.com", "mail.by", "mail.mezimages.net", "mail4trash.com", "mailbidon.com", "mailcatch.com", "maileater.com", "mailexpire.com", "mailin8r.com", "mailinator.com", "mailinator.net", "mailinator2.com", "mailincubator.com", "mailme.lv", "mailnator.com", "mailnull.com", "mailzilla.org", "mbx.cc", "mega.zik.dj", "meltmail.com", "mierdamail.com", "mintemail.com", "moncourrier.fr.nf", "monemail.fr.nf", "monmail.fr.nf", "mt2009.com", "mx0.wwwnew.eu", "mycleaninbox.net", "mytrashmail.com", "neverbox.com", "nobulk.com", "noclickemail.com", "nogmailspam.info", "nomail.xl.cx", "nomail2me.com", "no-spam.ws", "nospam.ze.tc", "nospam4.us", "nospamfor.us", "nowmymail.com", "objectmail.com", "obobbo.com", "onewaymail.com", "ordinaryamerican.net", "owlpic.com", "pookmail.com", "proxymail.eu", "punkass.com", "putthisinyourspamdatabase.com", "quickinbox.com", "rcpt.at", "recode.me", "recursor.net", "regbypass.comsafe-mail.net", "safetymail.info", "sandelf.de", "saynotospams.com", "selfdestructingmail.com", "sendspamhere.com", "shiftmail.com", "****mail.me", "skeefmail.com", "slopsbox.com", "smellfear.com", "snakemail.com", "sneakemail.com", "sofort-mail.de", "sogetthis.com", "soodonims.com", "spam.la", "spamavert.com", "spambob.net", "spambob.org", "spambog.com", "spambog.de", "spambog.ru", "spambox.info", "spambox.us", "spamcannon.com", "spamcannon.net", "spamcero.com", "spamcorptastic.com", "spamcowboy.com", "spamcowboy.net", "spamcowboy.org", "spamday.com", "spamex.com", "spamfree24.com", "spamfree24.de", "spamfree24.eu", "spamfree24.info", "spamfree24.net", "spamfree24.org", "spamgourmet.com", "spamgourmet.net", "spamgourmet.org", "spamherelots.com", "spamhereplease.com", "spamhole.com", "spamify.com", "spaminator.de", "spamkill.info", "spaml.com", "spaml.de", "spammotel.com", "spamobox.com", "spamspot.com", "spamthis.co.uk", "spamthisplease.com", "speed.1s.fr", "suremail.info", "tempalias.com", "tempemail.biz", "tempemail.com", "tempe-mail.com", "tempemail.net", "tempinbox.co.uk", "tempinbox.com", "tempomail.fr", "temporaryemail.net", "temporaryinbox.com", "thankyou2010.com", "thisisnotmyrealemail.com", "throwawayemailaddress.com", "tilien.com", "tmailinator.com", "tradermail.info", "trash2009.com", "trash-amil.com", "trashmail.at", "trash-mail.at", "trashmail.com", "trash-mail.com", "trash-mail.de", "trashmail.me", "trashmail.net", "trashymail.com", "trashymail.net", "tyldd.com", "uggsrock.com", "wegwerfmail.de", "wegwerfmail.net", "wegwerfmail.org", "wh4f.org", "whyspam.me", "willselfdestruct.com", "winemaven.info", "wronghead.com", "wuzupmail.net", "xoxy.net", "yogamaven.com", "yopmail.com", "yopmail.fr", "yopmail.net", "yuurok.com", "zippymail.info", "jnxjn.com", "trashmailer.com", "klzlk.com", ); $email_split = explode('@', $email); $email_domain = $email_split[1]; if (in_array($email_domain, $blacklist)) { //Return 1, disposable email detected return 1; } else { //Return 0, no match found return 0; } } ?> |
To update the array list, simply add a website domain without the @ sign at the end of the list (before the ); ) with double quotes surrounding it. Then add a comma to the end of this line. For example, if I wanted to add example.com, I would add:
|
1 |
"example.com", |
So that the end of the list would look like:
|
1 2 3 4 5 |
"jnxjn.com", "trashmailer.com", "klzlk.com", "example.com", ); |
The Check – Add this to your registration script or page. In the following code, $email is the variable that contains the email a user has indicated they want to sign up with. It runs the email through the function disposablecheck and then allows you to manipulate the result.
|
1 2 3 4 5 6 7 8 |
<?php if (disposablecheck($email) == 1) { //do stuff for disposable emails } else { //do stuff if not disposable email } ?> |
Typically you would provide an error or redirect the user in scenario where no disposable email is detected and just let the script continue if no disposable email was detected. The following code is one way in which you can do this for a wordpress website.
|
1 2 3 4 5 6 |
<?php if (disposablecheck($email) == 1) { //Disposable email detected wp_redirect( 'http://www.example.com/register'); } ?> |
The End Result
Before implementing this on one of my websites, I would get at least 15 low quality registrations a day. After this implementation that has decreased to zero! Low quality users often give up after trying a few disposable emails and move on to the next website. However, make sure you update the array blacklist as necessary.
Good luck!
Word Count:
432
Back to 
Hi Mohammad,
one hard point is to keep the list of disposable domains up to date. Have you heared of http://www.block-disposable-email.com before? It could also be a good solution for your needs.
Free for up to 200 queries a month.