Publisher review:validateEmail looks not only in TLD for MX _records_, also in sub-domains. This version of validateEmail() looks not only in TLD for MX _records_, also in sub-domains. Its necassary for adresses like someone@uibk.ac.at.
This function takes in an email address (say 'shane@tuna.org' and tests to see if it's a valid email address. An array with the results is passed back to the caller. Possible result codes for the array items are: Item 0: [true|false] true for valid email address false for NON-valid email address Item 1: [SMTP Code] if a valid MX mail server found, then fill this array in with failed SMTP reply codes Item 2: [true|false] true for valid mail server found for host/domain false if no valid mail server found
Item 3: [MX server] if a valid MX host was found and connected to then fill in this item with the MX server hostname
EXAMPLE code for use is at the very end of this function.
validateEmail is a PHP script for Snippets scripts design by Frank Vogel.
It runs on following operating system: Windows / Linux / BSD / Solaris.
Operating system:Windows / Linux / BSD / Solaris