email address validation

Possible Duplicates:
Is there a php library for email address validation?
How to check if an email address exists without sending an email?

hi guys,

how can i validate the email address to email provider just like yahoo?

scenario:

asdfasdf@yahoo.com

how can i validate it to yahoo.com that the email stated above is valid?

Thanks in Advance.

---- PHP Rules ----


I hope the following document helps:

Validate an E-Mail Address with PHP, the Right Way


The only "propper" way to validate an email is to actually try to send an email to that address, but most times a regular expression will do the trick.

To complicate the issue, you might just want a simple validation like this

^[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,6}$

or a somewhat more complex one like this

[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+(?:[A-Z]{2}|com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|museum)b

There is a pretty good article about email validation here


您可以发送电子邮件到该地址,并让用户通过点击链接进行验证。

链接地址: http://www.djcxy.com/p/92714.html

上一篇: 如何验证在PHP中的电子邮件地址?

下一篇: 电邮地址验证