Unable to send mail from Web Presence Builder "contact form" : Uncaught exception 'Zend_Mail_Transport_Exception'

Created:

2016-11-16 12:55:21 UTC

Modified:

2017-04-24 12:07:31 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to send mail from Web Presence Builder "contact form" : Uncaught exception 'Zend_Mail_Transport_Exception'

Applicable to:

  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux

Symptoms

Sending a message from Web Presence Builder "contact form" fails with the below error:

<b>Fatal error</b>:  Uncaught exception 'Zend_Mail_Transport_Exception' with message 'Unable to send mail. mail(/var/www/vhosts/domain.tld/statistics/logs/mail.log) [&lt;a href='function.mail'&gt;function.mail&lt;/a&gt;]: failed to open stream: Permission denied' in /var/www/vhosts/domain.tld/httpdocs/addon-domain.tld/includes/Zend/Mail/Transport/Sendmail.php:137

Cause

The custom mail log file is set in the php settings. And there is no required permissions for php process to write logs in the log file. As a result the error message can appear when message is sent.

Resolution

Check php configuration file 'php.ini' for the required domain. If the following option is configured it is required to check permissions for this log file.

mail.log = /var/www/vhosts/system/domain.tld/logs/mail.log

The correct permissions for this file can be seen from the following line:

# ls -la /var/www/vhosts/system/domain.tld/logs/mail.log
-rw-rw-r-- 2 root psacln 118431 Dec 6 12:56 /var/www/vhosts/system/domain.tld/logs/mail.log

In order to set these permissions following commands can be used:

chmod g+w /var/www/vhosts/system/domain.tld/logs/mail.log
chgrp psacln /var/www/vhosts/system/domain.tld/logs/mail.log

Another solution of this issue is to comment or remove the following line from the php configuration file 'php.ini' .

mail.log = /var/www/vhosts/system/domain.tld/logs/mail.log
Have more questions? Submit a request
Please sign in to leave a comment.