title: php Mail() function doesn't work
body: <p>I'm working on a php script which has to send emails. But my mail() function doesn't work. I know that I have to configure somehow php.ini and may be something else but I don't know what exactly and how. I installed sendmail, by the way.
  Any ideas?  Thanks a lot.
  this is my code.</p>
  
  <pre><code>error_reporting(E_ALL); 
  
  $to  = 'name@gmail.com';
  
  $subject = 'subject';
  
  $message = 'text';
  
  $headers  = 'MIME-Version: 1.0' . "\r\n";
  $headers .= 'Content-type: text/html; charset=windows-1251' . "\r\n";
  $headers .= 'To: user &lt;user@example.com&gt;' . "\r\n";
  $headers .= 'From: server &lt;server@example.com&gt;' . "\r\n";
  
  mail($to, $subject, $message, $headers);
  </code></pre>
  
  <p>in php.ini i put <code>sendmail_path ="/usr/sbin/sendmail"</code></p>
  
  <p>ps. i Use Ubuntu</p>
  
  <p>guys, in the mail.log file i got</p>
  
  <pre><code>Apr 29 16:12:05 IT02 sendmail[7660]: My unqualified host name (IT02) unknown; sleeping    for retry 
  Apr 29 16:13:05 IT02 sendmail[7660]: unable to qualify my own domain name (IT02) -- using short name 
  Apr 29 16:13:05 IT02 sendmail[7660]: p3TED551007660: from=www-data, size=210, class=0, nrcpts=0, msgid=&lt;201104291413.p3TED551007660@IT02&gt;, bodytype=8BITMIME, relay=www-data@localhost 
  </code></pre>
  
  <p>Does anybody know what it means?</p>