• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Php mail function not working after plesk update

Niels van de rWal

New Pleskian
Hi,

After updating Plesk from 11.x to 12.5, the mail() function doesn't work anymore.
I can sent mail with Outlook (imap) and webmail, but on a website I can't.
I tried it with the mail() function, but also the phpmailer class don't work.
The mail() function always returns false. (no errors)

After searching hours for a solution, I hope you can help me?

Greetings
 
Make sure that you have enabled option "Allow users and scripts to use Sendmail" in Tools&Settings -> Mail Settings
 
Check that you haven't this function in php disabled_functions option for this subscription.
 
Check that you haven't this function in php disabled_functions option for this subscription.
This is in my php.ini:
Code:
; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names.
; http://php.net/disable-functions
disable_functions =
 
Hi Niels van de rWal,

if you would like help with your investigations, consider to add depending entries from your mail - log ( /var/log/ ) . It helps as well to include depending entries from your apache and/or nginx - logs, located at "/var/www/vhosts/system/(SUB)DOMAIN.COM/logs/", if you use scripts.
 
Same problem here after upgrading from 11.5 to 12.5.
The strange thing is that trying to send with
<?php
// Send email
mail("[email protected]","hello","test mail function");
?>
as suggested by Igor, the e-mail arrives.

But all wordpress forms and Others script sending mail for all domains on the server don't work.

Someone can help us?
 
I'm trying using the CHECK MAIL plugin for wordpress and i got important info looking to log files:

[Mon Nov 07 16:15:46 2016] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: PHP Warning: stream_socket_enable_crypto(): SSL operation faile, referer: http://www.MYDOMAIN.com/wp-admin/tools.php?page=checkemail
[Mon Nov 07 16:15:46 2016] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: d with code 1. OpenSSL Error messages:, referer: http://www.MYDOMAIN.com/wp-admin/tools.php?page=checkemail
[Mon Nov 07 16:15:46 2016] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /var/www/vhosts/MYDOMAIN.com/httpdocs/wp-includes/class-smtp.php on line 344, referer: http://www.MYDOMAIN.com/wp-admin/tools.php?page=checkemail

So it seems that new php 5.6 verifies SSL certificates by default. Look here: https://github.com/PHPMailer/PHPMailer/issues/368
In this thread there is explanation to avoid this test but is also explained that is better to fix SSL verification... but how to do that?
 
So... no answers... so i change the question. New servers with a native Plesk 12.5 panel have already a SSL certificate installed? Or they have a different php.ini configuration in order to avoid PHP 5.6 checkings on ssl?
I'm going crazy with this problem...
 
Back
Top