title: Php mail() is not working but sendmail is.
body: <p>I have an Amazon EC2 instance running with RH/Linux. My problem is php mail() function which is not working although I can send mail with sendmail from command line.</p>
  
  <p>I run this command. <code># telnet localhost 25</code> </p>
  
  <pre><code>Trying 127.0.0.1...
  Connected to localhost.
  Escape character is '^]'.
  XXXXX
  </code></pre>
  
  <p>My php.ini setting is </p>
  
  <pre><code> mail function]
   SMTP = localhost
   smtp_port = 25
   sendmail_path = /usr/sbin/sendmail -t -i
   mail.add_x_header = On
  </code></pre>
  
  <p>I can't fingure out whats wrong. I am not getting any php mail error. I don't get any email as well. What could the problem be?</p>