# SSMTP/PHP/APACHE headache



## Johnny2Bad (Oct 28, 2012)

Hi,
I received the following error when attempting to send email via php....

```
Warning: mail(/var/log/ssmtp.log) [function.mail]: failed to open stream: Permission denied in
 /usr/local/www/apache22/data/process.php on line 74
```
The file is question /var/log/ssmtp.log is owned by ssmtp and is in the group ssmtp with read/write permissions respectively. If I could get to the output of the php script I would be able to do more investigation. But it wont let me.

Could Apache22 be stopping it?

Anyway any input at this point would be much appreciated,
Jono.


----------



## Johnny2Bad (Oct 28, 2012)

Problem solved, php was looking for ssmtp in /usr/sbin not /usr/local/sbin. Once I corrected the entry in php.ini it works like a charm. This was reported in the httpd-error.log (Apache 22).

Still can't get the damn thing to do ssmtp mail logs though. I'll have another look at that later.

Sorry for the inconvenience.

Cheers,
Jono.


----------

