• Resolved Major@PG

    (@tmajor)


    After upgrading from PHP 7.4.28 to PHP 8.1.3 (using Plesk Obsidian Web Host Edition Version 18.0.42 Update #1), no mails sent anymore through a manually set SMTP-Server.

    Versions:
    WordPress: 5.9.3
    WordPress MS: No
    PHP: 8.1.3
    WP Mail SMTP: 3.4.0
    
    Params:
    Mailer: smtp
    Constants: No
    ErrorInfo: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    Host: smtp.strato.de
    Port: 465
    SMTPSecure: ssl
    SMTPAutoTLS: bool(true)
    SMTPAuth: bool(true)
    
    Server:
    OpenSSL: OpenSSL 1.1.1  11 Sep 2018
    
    Debug:
    Email Source: WP Mail SMTP
    Mailer: Benutzerdefinierter SMTP-Server
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    
    SMTP Debug:
    
    2022-04-29 13:25:33 Connection: opening to ssl://smtp.strato.de:465, timeout=300, options=array()
    
    2022-04-29 13:25:33 Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed [xxxxxxxxxxxxxxxx(sorry, not for your eyes)xxxxxxxxxxxxxxx/wp-includes/PHPMailer/SMTP.php line 388]
    
    2022-04-29 13:25:33 Connection failed. Error #2: stream_socket_client(): Failed to enable crypto [xxxxxxxxxxxxxxxx(sorry, not for your eyes)xxxxxxxxxxxxxxx/wp-includes/PHPMailer/SMTP.php line 388]
    
    2022-04-29 13:25:33 Connection failed. Error #2: stream_socket_client(): Unable to connect to ssl://smtp.strato.de:465 (Unknown error) xxxxxxxxxxxxxxxx(sorry, not for your eyes)xxxxxxxxxxxxxxx/wp-includes/PHPMailer/SMTP.php line 388]
    
    2022-04-29 13:25:33 SMTP ERROR: Failed to connect to server:  (0)
    
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    • This topic was modified 2 years, 7 months ago by Major@PG.
Viewing 1 replies (of 1 total)
  • Thread Starter Major@PG

    (@tmajor)

    Problem solved.

    The source of the problem was the php.ini for PHP 8.1, and a small difference compared to the php.ini for PHP7.4.

    Somehow the last row of the following content was missing in the new PHP 8.1 php.ini file causing a certificate error, because OpenSSL didn’t find the cacert.pem.

    [openssl]
    ; The location of a Certificate Authority (CA) file on the local filesystem
    ; to use when verifying the identity of SSL/TLS peers. Most users should
    ; not specify a value for this directive as PHP will attempt to use the
    ; OS-managed cert stores in its absence. If specified, this value may still
    ; be overridden on a per-stream basis via the "cafile" SSL stream context
    ; option.
    openssl.cafile=/usr/local/etc/cacert.pem

    The Plugin is now functioning normally.

Viewing 1 replies (of 1 total)
  • The topic ‘SSL problem after upgrade to php 8.1.3’ is closed to new replies.