salve ho scaricato il making user 1.2 ma ora non so come mai non mi invia piu le email in fase di registrazione e uqando faccio pass domenticata

Codice PHP:
<?PHP
###########################################
#-----------Users login system------------#
###########################################
/*=========================================\
Author      :  Mohammed Ahmed             \\
Version     :  1.2                        \\
Date Created:  Aug 20  2005               \\
----------------------------              \\
Last Update:    26-APR-2008               \\
----------------------------              \\
Country    :   Palestine                  \\
City       :   Gaza                       \\
E-mail     :   [email]m@maaking.com[/email]              \\
WWW        :   [url]http://www.maaking.com[/url]     \\
Skype      :   maaking                    \\
                                          \\
===========================================\
------------------------------------------*/
include ("functions.php");

// the Default function.
//note for functions: if you want to include a value of some variables inside the funtions,
//then you have to GLOBAL it first.
function index($user) {
     global 
$db$prefix;

     
//check if the user is logged in or not.
     
if (is_logged_in($user)) {
          include(
"header.php");

          
//get_my_info($user);
          
$cookie_read explode("|"base64_decode($user));
          
//define variables to hold cookie values.
          
$userid $cookie_read[0];
          
$username $cookie_read[1];
          
$password $cookie_read[2];
          
$ipaddress $cookie_read[3];
          
$lastlogin_date $cookie_read[4];
          
$lastlogin_time $cookie_read[5];
          if(
$ipaddress == ""$ipaddress ""._NOT_YET."";
          
          
//print wilcome message
          
echo "".Benvenuto." [b]$username[/b], ".Ultimo." ".accesso." ".eseguito." [$lastlogin_date @ $lastlogin_time] ";
          echo 
"



"
;
          
navigation_menu();
          
          include(
"footer.php");
     }else{
         
//if the user is not logged in then show the login form.
         //  header("Location: users.php?maa=Login");  die();
         
include("header.php");
         
login_form();
         include(
"footer.php");
    }
}
################################################################################
#------------------------------------------------------------------------------#
#  navigation menu
#------------------------------------------------------------------------------#
################################################################################
function navigation_menu(){
echo  
" <center>"
     
." [ <a href=\"users.php\">".Home."</a> ] "
     
." [ <a href=\"users.php?maa=Documentazione\">".Documentazione."</a> ] "
     
." [ <a href=\"users.php?maa=EditMyInfo\">".Cambia." ".i." ".tuoi." ".dati."</a> ]"
     
." [ <a href=\"users.php?maa=ChangePWD\">".Cambia." ".Password."</a> ]"
     
." [ <a href=\"users.php?maa=Logout\">".Esci."</a> ]"
     
." </center>
"
;


################################################################################
#------------------------------------------------------------------------------#
#  Register
#------------------------------------------------------------------------------#
################################################################################
function Register(){

         include(
"header.php");
         
register_form();
         include(
"footer.php");
}

function 
register_form(){
         global 
$username$password$password2$email$fullname$user_taken_err$email_taken_err;
echo 
"<center><font class=\"title\">".REGISTRATI."</font></center>
\n"
;
//onsubmit='return CheckRegisterForm(RegisterForm)'
echo "<center>".Tutti." ".i." ".campi." ".sono." ".obbligatori."
      <form name=\"RegisterForm\" method=\"POST\" action=\"users.php\">
      <table align=\"center\" border=\"1\" width=\"350\" id=\"table1\" cellpadding=\"2\" bordercolor=\"#C0C0C0\">
        <tr>
            <td width=\"150\" align=\"right\">"
.Username." :</td>
            <td><input type=\"text\" name=\"username\" size=\"18\" value=\"
$username\">  $user_taken_err</td>
        </tr>
        <tr>
            <td align=\"right\">"
.Password." :</td>
            <td><input type=\"password\" name=\"password\" size=\"18\" value=\"
$password\"> </td>
        </tr>
        <tr>
            <td align=\"right\">"
.Reinserire." ".Password." :</td>
            <td><input type=\"password\" name=\"password2\" size=\"18\" value=\"
$password2\"> </td>
        </tr>
        <tr>
            <td align=\"right\">"
.Email." :</td>
            <td><input type=\"text\" name=\"email\" size=\"27\" value=\"
$email\">  $email_taken_err</td>
        </tr>
        <tr>
            <td align=\"right\">"
.CognomeNome." :</td>
            <td><input type=\"text\" name=\"fullname\" size=\"27\" value=\"
$fullname\"></td>
        </tr>
        <tr>
            <td></td>
            <td> <input type=\"hidden\" name=\"maa\" value=\"do_Register\">
                             <input type=\"submit\" value=\""
.Registra."\"></td>
        </tr>
    </table>
    </form>
        <center></center>"
;
}
function 
do_Register(){
          global 
$db$prefix$username$password$password2$email$fullname$user_taken_err$email_taken_err;
          global 
$site_name$site_email$site_url$validate;
          
          
//this function will check fields incase of javascript not working.
          
if((!$username) || (!$password) || (!$password2) || (!$email) || (!$fullname)){

                if(
trim(empty($username))){

                }
                if(empty(
$password)){

                }
                if(empty(
$password2)){

                }
                if(
trim(empty($email))){

                }
                if(
trim(empty($fullname))){

                }
                
//print the error message and load the form.
                
include("header.php");


                echo 
"<center><font class=\"error\">".ERRORE." ".RIEMPIRE." ".TUTTI."".I."".CAMPI."</font></center>\n";
                
register_form();
                include(
"footer.php");
                exit();
          }
          
//this code will check if the 2 passwords are match or not.
          
if($password != $password2){
                
//print the error message and load the form.
                
include("header.php");

                
register_form();
                echo 
"<center><font class=\"error\">"._ERROR_PASSWORD_DOESNT_MATCH."</font></center>\n";

                include(
"footer.php");
                exit();
          }
          
//this code will check if the email is correct or not
          
if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$"$email)){
                
//print the error message and load the form.
                
include("header.php");

                
register_form();
                echo 
"<center><font class=\"error\">"._ERROR_INVALID_EMAIL."</font></center>\n";

                include(
"footer.php");
                exit();
          }
          
          
          
//--nothing empty? everything is okay? lets do the register.
          
$sql_email_check $db->sql_query("SELECT email FROM ".$prefix."_users WHERE email='$email'");
          
$sql_username_check $db->sql_query("SELECT username FROM ".$prefix."_users WHERE username='$username'");
          
$email_check $db->sql_numrows($sql_email_check);
          
$username_check $db->sql_numrows($sql_username_check);

          if((
$email_check 0) || ($username_check 0)){

               
//define error message for usage in multi plces.
               
$exist_msg"<font class=\"error\">"._ALREADY_TAKEN."</font>";

               if(
$email_check 0){
                  
$email_taken_err =  $exist_msg;
                  unset(
$email);
               }

               if(
$username_check 0){
                  
$user_taken_err =  $exist_msg;
                  unset(
$username);
               }

               
//if the username or email already been taken load the form and print errors.
               
include("header.php");
               
register_form();
               include(
"footer.php");
               exit();
          }
          
          
//if you as and admin forsed users to vaildate their accounts.
          
if($validate == 1){
             
$isactive 0;
             
//generate random code
             
$code md5(time());
             
$code rand(0,999999999);
             
             
$subject _VALIDATE_EMAIL;

          }else{
                
$isactive 1;
                
$subject _YOUR_INFO_AT;
          }
          
          
$md5_password md5($password);
          
$result $db->sql_query("INSERT INTO ".$prefix."_users ( username,password,email,fullname,regdate,isactive,code) "
                                                       
."  VALUES('$username','$md5_password','$email','$fullname',NOW(),'$isactive','$code')");
          
$eol ="\r\n";
          
$message "$eol";
          
$message .= ""._WELCOME_TO.$site_name $eol";
          
$message .= "$eol";
          
$message .= ""._PLZ_KEEP_THIS_EMAIL.$eol";
          
$message .= "$eol";
          
$message .= "---------------------------- $eol";
          
$message .= ""._USERNAME.": $username  $eol;
          
$message .= ""._PASSWORD.": $password $eol";
          
$message .= "---------------------------- $eol";
          
$message .= "$eol;

          if(
$validate == 1){
          
$message .= ""._YOUR_ACCOUNT_IS_NOT_ACTIVE.$eol";
          
$message .= "$eol;
          
$message .= "$site_url/users.php?maa=Activate&code=$code $eol";
          }else{
          
$message .= ""._YOUR_ACCOUNT_IS_CURRENTLY_ACTIVE.$eol";
          
$message .= "$eol;
          
$message .= "$site_url $eol";
          }

          
$message .= "$eol";
          
$message .= ""._PLZ_DONT_FORGOT_PWD.$eol";
          
$message .= $eol";
          
$message .= ""._THANKS_FOR_REGISTERING."  $eol";
          
$message .= "$eol";
          
$message .= "-- $eol";
          
$message .= "- $site_name $eol";
          
$message .= "$site_url $eol";
          
$message .= "$eol";
          
$message .= "$eol";
          
$message .= ""._THIS_EMAIL_AUTO_GENERATED.$eol;
          
$message .= ""._DONT_RESPOND_WILL_IGNORED.$eol";

          
#set email headers  to aviod spam filters
          
$headers .= "From: ".$site_name."<".$site_email.">".$eol;
          
$headers .= "Reply-To: ".$site_name."<".$site_email.">".$eol;
          
$headers .= "Return-Path: ".$site_name."<".$site_email.">".$eol;
          
$headers .= "Message-ID: <".time()."-".$site_email.">".$eol;
          
$headers .= "X-Mailer: PHP v".phpversion().$eol;
          
$headers .= 'MIME-Version: 1.0'.$eol.$eol;
          
          if(!
mail($email,$subject,$message$headers)){
             die (
""._EMAIL_DIE."");
          }else{
                include(
"header.php");

                   if(
$validate == 1){
                      echo 
"

<div align=\"center\" class=\"div\">"
._REG_SUCCESS_VALIDATE."</div>

 <center>"
._GOHOME."</center>";

                   }else{
                         echo 
"<div align=\"center\" class=\"div\">"._REG_SUCCESS."</div>";
               
mkdir("./$fullname"0777);
             
                         
login_form();
                   }


                
                include(
"footer.php");
         }
}