• Category Category: Coding
  • Comment Comments: 5
  • View View: 9238
  • View Word Count: 432

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.

 

Mailinator Disposable Email Service

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 if it one is not.

 

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:

So that the end of the list would look like:

 

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.

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.

 

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!

   

About the Author Gold Star Staff Member

Mohammad Permalink: http://www.articlevoid.com/?action=permalink&article=50839
Author:
Website: http://www.mohammadg.com
About me: The webmaster of ArticleVoid. I own many other websites and I am fluent in X(HTML), PHP, Javascript, Java and C++. I spend a lot of my time online and currently own many websites. I love writing and created this website so users can share their knowledge in order to make the world just a little bit smarter!

  • authorBy:
  • writerPosted On:
  • live Published articles: 43

Comments (5)

  • Itz
    Itz (January 10, 2013 at 12:56 am)

    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.

  • fabian kessler
    fabian kessler (April 26, 2014 at 11:19 pm)

    It’s a simple approach to check against a local list, and probably covers 90% of all. Another web service with up-to-date lists is at http://www.nameapi.org/en/live-demos/disposable-email-address-detector/ (I work for them). You can query that easily with the PHP library from https://github.com/optimaize/nameapi-client-php

  • Richard MacLeod
    Richard MacLeod (May 21, 2014 at 2:53 pm)

    What is atarax?

    It is reduces an activity in the central nervous system. It also acts as an antihistamine that reduces the natural chemical histamine in the body. It is sneezing and runny nose, or hives on the skin. Atarax is used as a sedative to treat anxiety and tension. It is also used together with other medication given for anesthesia. It controls nausea and vomiting. And also used to treat allergic skin reaction such as hives or contact dermatitis. It may be purpose not listed in this medication guide.

    Important information about atarax?

    • Drinking alcohol can increase certain side effects of atarax.
    • Stop using hydroxyzine and call your doctor at once if you have a serious side effect such as confusion, seizure, or restless muscle movement in your eyes, tongue, or neck.
    • This medication may impair your thinking or reactions.
    • They do careful if you drive or do anything that requires you to be alert.
    • When you take hydroxyzine, tell your doctor if you have a seizure disorder, liver disease or kidney disease.

    How to use hydroxyzine :

    • This medication by mouth with or without food as directed by your doctor, usually three or four times daily.
    • Do not use a household spoon because you may not get the correct dose.
    • The dosage is based on your age, medical condition, and response to treatment. In children, the dosage may also be based on weight.
    • Do not increase your dose or take this medication more often than directed.
    • Drowsiness, dizziness, blurred vision, or dry mouth may occur. If any of these effects persist or worsen, tell your doctor or pharmacist promptly.
    • Many people using this medication do not have serious side effects.
    • You have any serious side effects, including: mental/mood changes (such as restlessness, confusion, and hallucinations), shaking difficulty urinating, fast/irregular heartbeat.
    • To relieve dry mouth, suck (sugarless) hard candy or ice chips, chew (sugarless) gum, drink water, or use a saliva substitute.
    • A very serious allergic reaction to this drug is rare. However, get medical help right away if you notice any symptoms of a serious allergic reaction, including: rash, itching.
    • Before using this medication, tell your doctor or pharmacist your medical history, especially of: breathing problems (such as emphysema, asthma), high pressure in the eye, heart problems.

    Missed dose :
    If it is near the time of the next dose, skip the missed dose and resume your usual schedule. Do not double the dose to catch up.

    STORAGE :
    Store at room temperature away from light and moisture. Do not store in the bathroom. Do not freeze liquid forms of this medication. Keep all medications away from children and pets. Do not flush medications down the toilet or pour them into a drain unless instructed to do so. Properly discard this product when it is expired or no longer needed.

    Hi friends, this is Richard MacLeod from UK. I am completed P.HD in Pharmacy. Now working in onlinepillmart.com as medical adviser. Also i write blog on Men’s and women’s health also other health related disease; like Zyrtec, Clarinex, Claritin, Xyzal, Allegra, Singulair etc. For more please visit : http://onlinepillmart.com/

  • Hatred
    Hatred (June 2, 2014 at 7:24 pm)

    No need to have duplicates like mailinator.com, .net, .org etc…

    Remove all the .com, .net, .org.. leave a period at the end just incase name has domain name in it (unlikely)

    Restrict all .info domains

    Restrict all e-mails with the word “Spam” in it.

    Do that, and your list is half as big.

    Searching through my users of over 10,000… this doesn’t effect any of them and if your worried simply write an error like (Disposable email detected, if this is an error.. contact blah@blah.com)

    No need to pay someone to check these stupid e-mails. Like he said.. they will probably try twice and give up.

  • Hatred
    Hatred (June 2, 2014 at 8:16 pm)

    Easier said then done… here’s an updated code tested on http://riseofchaos.com

    // FAKE EMAILS
    $fakemail = array(“spam”, “.info”, “clickemail.”, “0wnd.”, “minutemail.”, “2prong.com”, “3d-painting.”, “4warding.”, “9ox.”, “a-bc.”, “amilegit.”, “anonbox.”, “anonymbox.”, “antichef.”, “baxomale.”, “beefmilk.”, “binkmail.”, “bio-muesli.”, “bobmail.”, “bodhi.”, “bofthew.”, “brefmail.”, “bsnow.”, “bugmenot.”, “bumpymail.”, “casualdx.”, “chogmail.”, “cool.fr”, “correo.blogos.”, “cosmorph.”, “courriel.”, “courrieltemporaire.”, “curryworld.”, “cust.”, “dacoolest.”, “dandikmail.”, “deadaddress.”, “devnullmail.”, “dfgh.”, “digitalsanctuary.”, “discardmail.”, “dispos”, “w3internet.”, “dodgeit.”, “dodgit.”, “dontreg.”, “dumpyemail.”, “e4ward.”, “email60.”, “emailias.”, “emailinfive.”, “emailmiser.”, “emailtemporario.”, “emailwarden.”, “ephemail.”, “explodemail.”, “fakeinbox.”, “fakeinformation.”, “fastacura.”, “filzmail.”, “fizmail.”, “frapmail.”, “garliclife.”, “get1mail.”, “getonemail.”, “girlsundertheinfluence.”, “gishpuppy.”, “great-host.”, “gsrv.”, “guerillamail.”, “guerillamail.com”, “guerrillamail.”, “guerrillamailblock.”, “hotpop.”, “inboxclean.”, “incognitomail.”, “ipoo.”, “irish2me.”, “jetable.”, “junk1e.”, “kaspop.”, “kurzepost.”, “lifebyfood.”, “link2mail.”, “litedrop.”, “lookugly.”, “lopl.”, “lr78.”, “maboard.”, “mail.by”, “mezimages.”, “mail4trash.”, “mailbidon.”, “mailcatch.”, “maileater.”, “mailexpire.”, “mailin8r.”, “mailinator”, “mailincubator.”, “mailme.”, “mailnator.”, “mailnull.”, “mailzilla.”, “mbx.”, “mega.”, “meltmail.”, “mierdamail.”, “mintemail.”, “moncourrier.”, “monemail.”, “mt2009.”, “mycleaninbox.”, “mytrashmail.”, “neverbox.”, “nobulk.”, “nomail.”, “nomail2me.”, “nowmymail.”, “objectmail.”, “obobbo.”, “onewaymail.”, “ordinaryamerican.”, “owlpic.”, “pookmail.”, “proxymail.”, “punkass.”, “quickinbox.”, “rcpt.”, “recode.”, “recursor.”, “comsafe-mail.”, “safetymail.”, “sandelf.”, “selfdestructingmail.”, “shiftmail.com”, “mail.me”, “skeefmail.”, “slopsbox.”, “smellfear.”, “snakemail.”, “sneakemail.”, “sofort-mail.”, “sogetthis.”, “soodonims.”, “speed.1s.”, “suremail.”, “tempalias.”, “tempemail.”, “tempe-mail.”,”tempinbox.”, “tempomail.”, “temporaryemail.”, “temporaryinbox.”, “thankyou”, “thisisnotmyrealemail.”, “throwawayemailaddress.”, “tilien.”, “trash2009.”, “trash-amil.”, “trashmail.”, “trash-mail.”, “trashymail.”, “tyldd.”, “uggsrock.”, “wegwerfmail.”, “wh4f.”, “willselfdestruct.”, “wronghead.”, “wuzupmail.”, “xoxy.”, “yogamaven.”, “yopmail.”, “yuurok.”, “zippymail.”, “jnxjn.”, “trashmailer.”, “klzlk.”);

    // THE FUNCTION
    function fakemail ($email){ global $fakemail;
    foreach ($fakemail as $fake){ if(preg_match(“/$fake/i”,”$email”)){ return true; } }
    }

    // TO USE
    if(fakemail($email)){ $err=’Please use a real e-mail address. If this is an error, contact your@contactinfo.com‘; $email=”; }

Post Comment

Most Recent Articles from Coding Category: