Hello,
What is the simplest way and how to check whether a given email address (or domain for this email) exists?
PLZ Help me out
How to check emailaddress is exists / not?
Moderator: General Moderators
-
php-pandit
- Forum Newbie
- Posts: 2
- Joined: Thu May 25, 2006 8:00 am
- Location: Bhuigaon, Vasai, Mumbai, Maharashtra, India
- Contact:
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
- dibyendrah
- Forum Contributor
- Posts: 491
- Joined: Wed Oct 19, 2005 5:14 am
- Location: Nepal
- Contact:
You can do this by checkdnsrr function.
Cheers,
Dibyendra
Code: Select all
// take a given email address and split it into the username and domain.
list($userName, $mailDomain) = split("@", $email);
if (checkdnsrr($mailDomain, "MX")) {
// this is a valid email domain!
}
else {
// this email domain doesn't exist!
}Dibyendra