They are deprecated functions and they shouldn't be used since they are going to be removed in future versions.

Instead of eregi, use preg_match, replace code with:
PHP Code: 
{
        return 
preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i"$email);
    } 
Same goes for the split function too, instead of that use explode function, replace with:
PHP Code: 
 $toArr explode(','$to);