PHP mail / PEAR mail
<p>On my directory website I have a "send email" functionality. This lets a user submit an enquiry to a company. A copy of this enquiry is also sent to my inbox.</p>

<p>A few months ago I noticed that I had stopped receiving the email copy to my inbox. So I investigated this and it turned out that my web host was no longer allowing sending external emails using the PHP mail function.</p>

<p>When I questioned this I was told that I would need to start using a third party mail plugin, and I was recommended to use PEAR.</p>

<p>So I converted my PHP script to use PEAR and managed to get it working on my site. All was good until until one day I thought it would be a good idead to switch to PHP 5.3 on my web host. A few days later I noticed that I had again stopped receiving the email copy to my inbox.</p>

<p>So again I investigated this and found that it was broken. I was told that I would need to revert back to PHP 5.2 for this to work. So basically that's what I had to do to make it work again.</p>

<p>My question is, how can I know when the mail functionality is broken as soon as it breaks? During the time it takes for me to realise it's broken, several enquiries could be being sent from the site which aren't actually going anywhere.</p>

<p>And secondly should I stick with PEAR or are there any better alternatives out there?</p>
