Question:
what are the email address verification rules?
1970-01-01 00:00:00 UTC
what are the email address verification rules?
Four answers:
2006-05-12 08:29:57 UTC
Hi,



to verify an email address send an email to the user request him to follow a link to verify that the email is correct or you may do the following routine :



1. check if the email address has @ and .

2. check for incompatible characters in the email address

3. check if the domain name (after @) is a valid domain

4. check if the user name (before @) is valid user name by connecting to domain's mail exchange (mx) server and verifying the username in domain.
Deobrat
2006-05-12 08:25:54 UTC
There are two steps for verification of an email address.

1- Check to see if it is correct format.

This can be easily verified by looking at it. If you want to do it programmatically, you can use a regular expression for it.

2 - Next, you try to contact the SMTP server for the domain specified email address and verify the existence of such email address on that server
2006-05-12 08:20:52 UTC
Hi!



Your question is too generic to answer. You ought to explain more precisely. K anyway, I just tell you generally.



The email verification is used to confirm the existance of the provided email address. For example, consider you are subscribing to an online magazine which will be delivered to your email inbox. While you subscribe the online magazine company get your email address and send you a verification email (it may contain some unique code to prove your identity). You have to sign in to your email account and check for such email and follow the link they provide to complete the verification process.



Hope it would be helpful to you..



(Would you mind voting me?)



Regards,

Arun R
Mohamed Mansour
2006-05-12 01:38:53 UTC
Hi, I am glad people are being aware about email address verification rules :)



Many organizations don't even care alot about it.



First of all, in the computer industry there is a standard on email protocol. We call it RFC standard. This standard is a must for everything which is online.



Now since there is a standard on how to do emails, an email should be well structured... Your question might be is how do we let the user know that his email that he entered is well structured?



That is a good question, and the answer will be, the use of regular expression. Regular expressions, commonly known as "Reg Ex" are a set of key combinations that are meant to allow people to have a large variety of control over what they are searching for. Reg Ex is used a lot under Unix, and is common between many programs.



Every programming language has this functionality.

The pattern below would be the regular expression for checking if the email is a valid email..



Normally a email is split by a name and a domain name@domain



Lets discuss the NAME part:

Reg ex Pattern: ^[0-9a-z_]([-_.]?[0-9a-z])*



- The name, according to the RFC can only consist of letters and numbers with 2 characters a dot (.) and a underscore (_)

- The name must start with a number or a letter, it CANNOT start with a symbol (./_).

- It must contain a letter or a number and can contain at least 1 or more symbol . Note can, but it could not.

- The name must end with a letter or a number, but not a symbol.



The above is STANDARD! And it must be valid! And the Pattern

I posted above matches that statement!



Now lets discus the domain:

Pattern: [0-9a-z][-.0-9a-z]*\\.[a-z]{2,3}[.]?$



- Notice that it must contain a number or a letter to start with

- And it MUST contain a dot.

- It MAY contain a underscore or more dots.

- But AFTER the dot it MUST contain 2 or 3 letters ( i made it that way you could place 4 )





Okay now I explained the verification rules, but one might ask on how do we use them?



Look up regular expressions in your programming language, I will show you how I did it in PHP language.





/**

*

* Checks validity of an email

*

*@author

*Mohamed Mansour (m0.interactive@gmail.com)

*@param host

* string which is the email address

*@return

*Boolean

*

*/

function CheckEmailContact($host) {

if (eregi("^[0-9a-z_]([-_.]?[0-9a-z])*@[0-9a-z][-.0-9a-z]*\\.[a-z]{2,3}[.]?$", $host, $check)) {



$host = substr(strstr($check[0], '@'), 1).".";

if(function_exists('getmxrr')) {

if (getmxrr($host, $validate_email_temp) )

return TRUE;

} else {

return TRUE;

}



// This checks if dns is valid

if(function_exists('checkdnsrr')) {

if(checkdnsrr($host,"ANY"))

return TRUE;

} else {

return TRUE;

}

}

return FALSE;

}







Notice I used it... And notice there is a function within my programming language which tells me if the DOMAIN is a valid domain by simply pinging the domain.





I hope I helpeD!


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...