title: PHP mail() function with gmail as receiver (noname.txt as attachment instead of text message)
body: <p>I have a problem with sending emails to gmail through Php mail() function. I tested this script with my yahoo mail and there is no problem (email body has no attachments). Here is my code:</p>
  
  <pre><code>$mailto = "info@email.com";
  $charset = "utf-8";
  $subject = "subject text";
  $content = "text/html";
  
      $headers  = "MIME-Version: 1.0\n";
      $headers .= "Content-Type: $content  charset=$charset\n";
      $headers .= "Date: ".date("Y-m-d (H:i:s)",time())."\n";
      $headers .= "From: \"".$mailto."\" &lt;".$mailto."&gt;\n";
      $headers .= "X-Mailer: My Send E-mail\n";
      $message = "message text";
  
      mail($_POST['posEmail'],$subject,$message,$headers);
  </code></pre>