SMTP Internal PHP mail trouble - Zend_Mail-Transport_Exception

DA-Rff

Verified User
Joined
Dec 4, 2006
Messages
119
I have a script that uses internal php mail function, when testing the sending of mail it throws the following error:

Code:
Error during e-mail sending: Zend_Mail_Transport_Exception:Unable to send mail. mail(/var/log/php-mail.log): failed to open stream: Permission denied

What settings should I change where to make this work?

Help much appreciated, thanks!

server is FreeBSD 9.1 with directadmin
 
What are permissions of the log file shown in the error?

What kind of errors do you see for the email in /var/log/exim/mainlog?

Jeff
 
What are permissions of the log file shown in the error?

What kind of errors do you see for the email in /var/log/exim/mainlog?

Jeff

Hi Jeff,

Thanks for thinking along!

Here's what I found out:

- my php.ini file had a setting that caused this, it said: mail.log = /var/log/php-mail.log

I checked /var/log/ directory and that had no php-mail.log file there

I commented the above line out of php.ini and then the error disappeared

Don't know it this is smart or not, but everything works and no more errors.

Thanks!
 
You could have course created the log file, which could be invaluable if a site is hacked and you need to trace what's being sent. (Or not, if you're comfortable with tracking the exim mainlog.)

But if you create it you should at least occasinally empty it, or set up log rotation so it won't eventually fill up your entire partition.

Jeff
 
Back
Top