<?php
        function IsValidEmail($strEmail)
        {
                // Validate the syntax
                if (eregi("^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $strEmail))
                {
                        return true;
                }
       
                return false;
        }
?>