VALIDATE EMAIL plugin for osCommerce by Vicente Aguilar http://www.bisente.com/proyectos/oscommerce-validate_email/ * CHANGELOG: - 20070409 - Initial release * LICENSE: This plugin is beerware: if you use it and we ever meet in person, you owe me (at least) a beer. Otherwise the GPL applies. * ABOUT: We've found that lots of customers enter fake e-mail addresses or just mistype them. This is a problem if you need to contact them, for example if there is not enough stock of a product, to send them the bank account numbert if they want to pay by bank transfer, etc. This plugin adds the following checks to both the create_account and account_edit pages: - A "verify email" box so the customer has to enter twice his e-mail address, just like the password. This way we can prevent mistypings. - If both addresses match, and after all the usual verifications at "tep_validate_email()" (syntax and domain), we try to connect to the domain's MX server at port 25 and send a mail. Only the EHLO, MAIL FROM and RCPT TO commands are issued, so no real mail gets sent. This way we get rid of both mistyped addressess and a lot of incorrect ones (non-existent domains and mailboxes). The plugin is based on the following code by Lennart Poot (www.twing.nl) found on the PHP getmxrr manual page: http://www.php.net/manual/es/function.getmxrr.php#64117 * CAVEATS: - Not all fake mailboxes are detected by issuing a "RCPT TO" to the corresponding server: only those whose server issues an SMTP-level error after the "RCPT TO". Some servers still accept mail for non-existent addresses and later send a bounce e-mail. These cases won't be detected by this method. - The account creation/modification process will take longer and the whole process may fail if there are problems with the network connection. - If your web server's IP is on some SPAM RBL list, weird things may happen. The error detection code is far from perfect and if the port 25 fails with an unexpected error (connection closed by the remote end because your IP is banned or the likes) the e-mail address will likely be denied as fake. * INSTALL: If you have a fresh osCommerce install, just copy all the files under /catalog to your installation dir. If you have modified your osCommerce site, take a look at the .diff file and apply it either with "patch" or by hand. There are few changes and they are marked by "/* START validate_mail */" and "/* END validate_mail */" so it should be fairly simple anyway.