mail() not working
<p>I am struggling to send mails through PHP, running on IIS7.  I have an SMTP server running on the server which I can access through telnet and send a mail through with no problems, and php.ini is configured as follows:</p>

<pre><code>[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25
</code></pre>

<p>When I run a simple PHP script to test the mail function:</p>

<pre><code>    $to = "test@email.com";
    $subject = "Test mail";
    $message = "Hello! This is a simple email message.";
    $from = "someonelse@example.com";
    $headers = "From:" . $from;
    if(mail($to,$subject,$message,$headers))
    {
        echo('ok');
    }
    else
    {
        echo('not ok');
    }
</code></pre>

<p>ok is returned however no mail is received.  I have set <code>error_reporting(-1);</code> and am getting no errors or warnings either.  I'm stumped as to what could wrong?</p>
