title: I can't get xampp or a remote server to send an email with my php mail function
body: <p>I have installed xampp on my computer for a school project, and I also have access to an apache server at school where I can upload my files and run them. </p>
  
  <pre><code>&lt;?php
  $headers.= 'MIME-Version: 1.0' . "\r\n";
  $headers.= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  $rating=$_POST['Rating'];
  $subject= "review from website";
  $name=$_POST['lname'].", ".$_POST['name'];
  $from = $_POST['email'];
  $to ="bricebathel@hotmail.com; bbathel@pembaserv.com;".$from.";";
  $messageTo="BBComputers";
  $headers = "From:" . $from;
  $message = htmlspecialchars($_POST['comment']);
  $about = $_POST['product'];
  $date=date("j-n-y \a\\t g:ia\n");
  mail($to,$subject,$message,$headers);
  echo "&lt;p id='contactUsData'&gt;Message Sent to: ".$messageTo."&lt;br&gt;Date: ".$date."&lt;br&gt;                       From: ".$name."&lt;br&gt; About: ".$about."&lt;br&gt; Rating: ".$rating."&lt;br&gt; Message:".$message."&lt;//p&gt;";
  
  
  $file_message="From: ".$name."\nEmail: ".$from."\nAbout: ".$subject."\nRating:   ".$rating."\nMessage: ".$message;
  $file= fopen("data/feedback.txt","a")
      or die("Error: Could not open the log file.");
  fwrite($file,"\n----------------------------\n")
      or die("Error: Could not open the log file.");
  fwrite($file,"Received: ".$date."\n")
      or die("Error: Could not open the log file.");
  fwrite($file,$file_message)
      or die("Error: Could not open the log file.");
  ?&gt;
  </code></pre>
  
  <p>I can't get it to send the mail from either xampp or the apache server </p>