Verifying the domain of an e-mail address

Last update on October 24, 2009 06:49 AM by jak58
Published by deri58

Verifying the domain of an e-mail addresse









rigjt


There are two parties for an email addresse : the username and the domain name

username@domain



The domain part defines a set of associated machines in which it requires a server for sending emails. In the domain there are different users. However it is currently impossible to verify the validity of an email addresse. Moreover the DNS server can detect whether the domain address exist or not.

In order to make this kind of verification, it may limit to a least a minimum damage when for a user to submit his email address.

Some features of PHP enable a query for DNS server. There is one who has the advantage of being simple and adequate for what you want to do: checkdnsrr (). It takes as argument a domain name and return TRUE or FALSE as the field exists or not.


To test the validity of an addresse domain name, run the following:

$domain = explode('@', $email);
if (checkdnsrr($domain[1]))
	echo "Domain for valid address";
Best answers for « Verifying the domain of an e mail address » in :
E-mail Address Not Verified Show [E-mail Address Not Verified] is displayed next to the username Introduction Configure your email address so that it works on MSN Messenger Introduction When you use MSN Messenger or Windows Live Messenger with an address not...
Verify and e-mail address format Show Verify and e-mail address format Using a filter With regular expressions Example of use Explanations What does the code do There are several ways to determine if a variable contains a valid email address. These techniques do not...
[WLM] doesn’t remember E-mail address Show[WLM] - doesn’t not remember E-mail address Issue Solution Note Issue Whenever I turn off my computer even though I checked “Remember me” on my Windows Live Messenger, it does not remember. Each time I turn my PC on I have to...
Obtaining a disposable email address ShowKasmail Spambox Jetable mail Enterto spamless email Yopmail Firefox extension Obtaining a disposable email address A disposable email is an e-mail service enabling you to send and receive mail for a short period. This practice is...
Outlook Express – unable to open e-mail attachments ShowOutlook Express – unable to open e-mail attachments Issue Solution Issue If you are receiving e-mails with attachment files and you are unable to open or save them, this is because your antivirus is blocking access to open. It is...
Introduction to email ShowWhat is email? Electronic mail (also known as email or e-mail) is one of the most commonly used services on the Internet, allowing people to send messages to one or more recipients. Email was invented by Ray Tomlinson in 1972. Why use email? The...
E-mail bombing ShowE-mail Bombing E-mail bombing involves sending several thousand identical messages to an electronic mailbox in order to overflow it. E-mails are stored on a messaging server until they are picked up by the owner of the messaging account. In this...
E-mail scams - Lotteries ShowInternational lottery You receive an e-mail stating that you are the lucky winner of the first prize of a major lottery worth several (hundred) thousand euros. To pocket your winnings, all you have to do is reply to the e-mail. After earning your...