Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Mail

Email id authentication

the mail() function

Moderators: macek, egami, gesf

Email id authentication

Postby vinodhini » Sun Jul 24, 2011 11:51 pm

Dear All,

My requirement is how to check the authenticity of the email id given by the user.

The process of checking should happen as soon as they enter their email id in the application.
If it is a valid & authenticated email id, the user should be allowed to proceed further with registration, if not he should be notified to enter a valid email id. This will help us in avoiding hundreds of mails bouncing back from invalid email ids.

Kindly help me with PHP coding for the above-mentioned requirement

Thank you.
vinodhini
New php-forum User
New php-forum User
 
Posts: 1
Joined: Sun Jul 24, 2011 11:37 pm

Re: Email id authentication

Postby bigjoe11a » Tue Sep 27, 2011 7:54 pm

vinodhini wrote:Dear All,

My requirement is how to check the authenticity of the email id given by the user.

The process of checking should happen as soon as they enter their email id in the application.
If it is a valid & authenticated email id, the user should be allowed to proceed further with registration, if not he should be notified to enter a valid email id. This will help us in avoiding hundreds of mails bouncing back from invalid email ids.

Kindly help me with PHP coding for the above-mentioned requirement

Thank you.


Try this

Code: Select all
function check_email($email){
 
if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) {
return true;
} else {
return false;
}
} // ends function

$isReal = check_email($email);
If(!isReal) {
echo 'Your email address is not valid';
exit;
}
User avatar
bigjoe11a
New php-forum User
New php-forum User
 
Posts: 128
Joined: Wed Aug 31, 2011 3:55 am
Location: USA


Return to PHP coding => Mail

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.