PHP mail() function causing slow page loads <p>I've been writing a number of PHP pages that involve using mail(). For the most part, it works well. However, occasionally (I'd say about 10-20% of the time), the mail() function causes the page to load exceptionally slowly, if at all. </p> <p>I haven't been able to find a similar problem on forums anywere. Just to reiterate, the mail() function works fine and sends mail, but when calling scripts with the mail() function in it, it occasionally causes slow page load times.</p> <p>Here's the important bits of what the pages look like. And for the record, we are using Microsoft Exchange Server 2007.</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;?php if ($_POST['submit'] == 'submit'){ //execute some php code. mail($to, $subj, $body, $headers, "O DeliveryMode=b"); } ?&gt; &lt;meta http-equiv="refresh" content="0"&gt; &lt;?php } &lt;/head&gt; &lt;body&gt; &lt;form action=&lt;?php echo $_SERVER['PHP-SELF']?&gt;&gt; &lt;!--Form Data--&gt; &lt;input type='submit' name='submit' value='submit'/&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>