php mail validator

coacalli

New Member
Messages
10
Reaction score
0
Points
0
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
 

xPlozion

New Member
Messages
868
Reaction score
1
Points
0
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 :-/
 

Scoochi2

New Member
Messages
185
Reaction score
0
Points
0
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
  • know how to access their emails
  • can read the same language that the email was written in and understand the phrase 'click this link to confirm email address'.
 

xPlozion

New Member
Messages
868
Reaction score
1
Points
0
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:

KSclans

New Member
Messages
197
Reaction score
0
Points
0
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...
 

xPlozion

New Member
Messages
868
Reaction score
1
Points
0
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.
 
Top