title: Sending mail takes long time in localhost
body: <p>I am using Ubuntu.I installed sendmail in my local host using the following command </p>
  
  <pre><code>sudo apt-get install sendmail
  </code></pre>
  
  <p>Now I would like to check whether mail goes from my localhost using following php code.</p>
  
  <pre><code>&lt;?php
  $to = "test@test.com";
  $subject = "Test mail";
  $message = "Hello! This is a simple email message.";
  $from = "someonelse@example.com";
  $headers = "From:" . $from;
  mail($to,$subject,$message,$headers);
  echo "Mail Sent.";
  ?&gt; 
  </code></pre>
  
  <p>When i execute the code, It takes very long time and finally echo the message as Mail Sent.
  Is there any possibilities to fix this ?   </p>