Do you still see the same error message after setting that directive? You may have forgotten to restart Apache, which is required for ini changes to take effect if PHP is installed as an Apache module. And of course you can simply provide the 'From:' field in the call to mail.
If you've taken all of these steps, then it would perhaps be better if we could see some code.
A PHP/C-Client/PEAR solution for webmail