+ Reply to Thread
Results 1 to 6 of 6

Thread: php mail validator

  1. #1
    coacalli is offline x10Hosting Member coacalli is an unknown quantity at this point
    Join Date
    Sep 2008
    Posts
    10

    php mail validator

    Greetings, I'm on the middle of the development for a design contest for a web site i'm working on.

    The client's main concern is to make it "the easyer the better" fot the visitor and refuses to use eMail validation on the most regular basis (send an e mail and ask for validation).

    The thing is that this client told me about eMail validating software out there, i've been searching and i'm afraid he won't pay for it, (starting at US$250 up to $800 is not an option - cheap bstrd) so, i''m trying to find a way to make a validation script, something that on the same moment find if the email is a valid email, not only if it has the right sintaxis - since that's only the first step - but to find if the domain exists and the username is valid on the domain.

    i still have no code, 'xcept 4 the sintaxis validation part - wich is the easy part - so, Any one has any word of advice on the matter?

    The server works under Windows and PHP 5.1

    Thanks on advance

  2. #2
    xPlozion's Avatar
    xPlozion is offline x10 Elder xPlozion is an unknown quantity at this point
    Join Date
    Mar 2008
    Location
    Delaware, USA
    Posts
    872

    Re: php mail validator

    hmm, i don't know if you can. the email will be sent to the domain, then the domain's server handles it from there. it'll get sent to the user, and if there's no user, then it'll return to the sender... i guess what i'm trying to say is that there's no easy way to check other than sending an email afaik...

    i guess you could use fsocket though if you wanted to, and probe to see if the mail socket is open to see atleast if it's a valid mail server, although alot of valid domains will return true :-/

  3. #3
    Scoochi2's Avatar
    Scoochi2 is offline x10 Sophmore Scoochi2 is an unknown quantity at this point
    Join Date
    Aug 2008
    Location
    Southport!
    Posts
    185

    Re: php mail validator

    Could you send a welcome email to the address?
    If the address doesn't exist, the mail daemon should bounce it. So you'll have to monitor your own email to see if any addresses are bouncing.

    Of course, it's not 100% foolproof, and that's why most sites use email validation. It's the easiest way. And it's not hard for the customer either, assuming that they
    1. know how to access their emails
    2. can read the same language that the email was written in and understand the phrase 'click this link to confirm email address'.
    If anyone can see it, my post was meant for anyone who reads it. Don't take it personally or think I'm being condescending... :nuts:

  4. #4
    xPlozion's Avatar
    xPlozion is offline x10 Elder xPlozion is an unknown quantity at this point
    Join Date
    Mar 2008
    Location
    Delaware, USA
    Posts
    872

    Re: php mail validator

    also, there's no way to tell that this is his email and not a corporate email admin @ x10hosting.com or your own webmaster email address on the site (webmaster @ yoursite.com/admin @ yoursite.com), assuming they exist.
    Last edited by xPlozion; 11-15-2008 at 04:43 PM.

  5. #5
    KSclans is offline x10 Sophmore KSclans is an unknown quantity at this point
    Join Date
    Nov 2007
    Posts
    198

    Re: php mail validator

    well to find if the input email is a real email you can use

    function isValidEmail($email = '')
    {
    return preg_match("/^[\d\w\/+!=#|$?%{^&}*`'~-][\d\w\/\.+!=#|$?%{^&}*`'~-]*@[A-Z0-9][A-Z0-9.-]{1,61}[A-Z0-9]\.[A-Z]{2,6}$/ix",$email);
    }

    I have no idea how that work but I put it in my register system..maybe yuo can understand it here
    http://snipplr.com/view/1983/php-email-validation/

    but still they can put like whatever@something.com and it will still be a valid email but I don't think they can really access to the email accouts, and you need to see if they own that email but they refuses to use eMail validation? I don't think it possible without making sure they can login...

  6. #6
    xPlozion's Avatar
    xPlozion is offline x10 Elder xPlozion is an unknown quantity at this point
    Join Date
    Mar 2008
    Location
    Delaware, USA
    Posts
    872

    Re: php mail validator

    well, all that function does is check if the email has the right syntax. it does not actually check if the proper email address exists on the server.

+ Reply to Thread

Similar Threads

  1. currently have an application pending php
    By biomasti in forum Free Hosting
    Replies: 1
    Last Post: 09-03-2008, 01:58 PM
  2. PHP mail()
    By banzap in forum Free Hosting
    Replies: 3
    Last Post: 03-12-2008, 08:35 PM
  3. mail() disabled w/ php v2
    By greenie in forum Free Hosting
    Replies: 1
    Last Post: 11-02-2007, 09:06 PM
  4. php mail function not working
    By aenman in forum Free Hosting
    Replies: 1
    Last Post: 10-26-2007, 11:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers