title: php email issues, successfully sent but not received anything
body: <p>it was 3 days i have the same problem, the email successfully sent, but i don't see any message, i use xampp localhost setting like this in sendmail.ini :</p>
  
  <pre><code>[sendmail]
  
  smtp_server = smtp.gmail.com
  smtp_port = 587
  error_logfile = error.log
  debug_logfile = debug.log
  auth_username = xxx@gmail.com
  auth_password = xxx
  force_sender = xxx@gmail.com
  </code></pre>
  
  <p>and in php.ini, i change this :</p>
  
  <pre><code>extension=php_openssl.dll
  
  [mail function]
  
  SMTP=smtp.gmail.com
  
  smtp_port=587
  
  sendmail_from = xxx@gmail.com
  
  sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
  ;sendmail_path="C:\xampp\mailtodisk\mailtodisk.exe"
  </code></pre>
  
  <p>am i doing something wrong ?, this my php code :</p>
  
  <pre><code>&lt;?php
  $name=$_POST['name'];
  $email=$_POST['email'];
  $subject=$_POST['subject'];
  $message=$_POST['message'];
  
  $to=$email;
  
  $message="From:$name &lt;br /&gt;".$message;
  
  $headers = "MIME-Version: 1.0" . "\r\n";
  $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
  
  $headers .= 'From: ashry &lt;xxx@gmail.com&gt;'."\r\n" . 'Reply-To: '.$name.' &lt;'.$email.'&gt;'."\r\n";
  $headers .= 'Cc: ashry.ramadhan17@gmail.com' . "\r\n";
  @mail($to,$subject,$message);
  if(@mail)
  {
  echo "Email sent successfully !!";    
  }
  ?&gt;
  </code></pre>
  
  <p>thank you for your reply!.</p>