i want to send a mail the code is given below. i cant understand waht is happening . It works on localhost but not on live server.
if (isset($_POST['test_mail'])){
                            $to             =   '2606ankit@gmail.com';  //put email address on which mail send
                           $subject     =   "Newsletter";                   //Put subject of mail here
                           $from        =   'ankit@studiokrew.com';     //put email address from 
                           //email body start
                          // $body    .=    file_get_contents('file/'.$filename.'');
                           $body      .= 'anio';
                           // Always set content-type when sending HTML email
                            $headers = "MIME-Version: 1.0" . "\r\n";
                            $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
                            // More headers
                            $headers .= 'From: '.$from. "\r\n";
                            //if you need to send cc mail then uncomment below line and change email address
                            //$headers .= 'Cc: myboss@example.com' . "\r\n";
                         mail($to,$subject,$body,$headers); 
  }
 
     
     
    