• Resolved duttoluca

    (@duttoluca)


    Hi

    I’m trying to connect to a mail server, but the test fails with:

    
    2020-12-23 16:55:16 Connection failed. Error #2: stream_socket_enable_crypto(): 
    SSL operation failed with code 1. 
    OpenSSL Error messages:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol 
    [/var/www/webpa/wp-includes/PHPMailer/SMTP.php line 426]
    
    SMTP Error: Could not connect to SMTP host.
    

    It looks like the server accepts only “old” TLS, is there any way to tell the plugin to accept them too?

    • This topic was modified 3 years, 11 months ago by duttoluca.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @duttoluca,

    Please share the full debug log. Here’s a screenshot for the option to get a full error log after sending the test email.

    It looks like you’re using an unsupported protocol. Make sure you’re using TLS encryption with port 587 or SSL with 465. The plugin uses whatever version of TLS is configured on your server.

    Thanks!

    Thread Starter duttoluca

    (@duttoluca)

    Thanks for your help, here the full log.
    AFAIK the SMTP server only accepts TLS1.0…
    My server is Ubuntu 20.04, PHP 7.4 + WordPress 5.5, OpenSSL 1.1.1f

    
    Versions:
    WordPress: 5.5
    WordPress MS: Yes
    PHP: 7.4.3
    WP Mail SMTP: 2.5.1
    
    Params:
    Mailer: smtp
    Constants: No
    ErrorInfo: SMTP Error: Could not connect to SMTP host.
    Host: mail.postassl.it
    Port: 587
    SMTPSecure: tls
    SMTPAutoTLS: bool(true)
    SMTPAuth: bool(true)
    SMTPOptions: {"ssl":{"verify_peer":false,"verify_peer_name":false,"allow_self_signed":true}}
    
    Server:
    OpenSSL: OpenSSL 1.1.1f 31 Mar 2020
    
    Debug:
    Mailer: Other SMTP
    SMTP Error: Could not connect to SMTP host.
    
    SMTP Debug:
    2020-12-24 09:20:36 Connection: opening to mail.postassl.it:587, timeout=300, options=array ( 'ssl' => array ( 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true, ),)
    
    2020-12-24 09:20:36 Connection: opened
    
    2020-12-24 09:20:36 SMTP INBOUND: "220 smtpcm1-pc.aruba.it bizsmtp ESMTP server ready"
    
    2020-12-24 09:20:36 SERVER -> CLIENT: 220 smtpcm1-pc.aruba.it bizsmtp ESMTP server ready
    
    2020-12-24 09:20:36 CLIENT -> SERVER: EHLO hosting.pa-online.it
    
    2020-12-24 09:20:36 SMTP INBOUND: "250-smtpcm1-pc.aruba.it hello [34.91.190.87], pleased to meet you"
    
    2020-12-24 09:20:36 SMTP INBOUND: "250-HELP"
    
    2020-12-24 09:20:36 SMTP INBOUND: "250-AUTH LOGIN PLAIN"
    
    2020-12-24 09:20:36 SMTP INBOUND: "250-SIZE 524288000"
    
    2020-12-24 09:20:36 SMTP INBOUND: "250-ENHANCEDSTATUSCODES"
    
    2020-12-24 09:20:36 SMTP INBOUND: "250-8BITMIME"
    
    2020-12-24 09:20:36 SMTP INBOUND: "250-STARTTLS"
    
    2020-12-24 09:20:36 SMTP INBOUND: "250 OK"
    
    2020-12-24 09:20:36 SERVER -> CLIENT: 250-smtpcm1-pc.aruba.it hello [34.91.190.87], pleased to meet you250-HELP250-AUTH LOGIN PLAIN250-SIZE 524288000250-ENHANCEDSTATUSCODES250-8BITMIME250-STARTTLS250 OK
    
    2020-12-24 09:20:36 CLIENT -> SERVER: STARTTLS
    
    2020-12-24 09:20:36 SMTP INBOUND: "220 2.0.0 Ready to start TLS"
    
    2020-12-24 09:20:36 SERVER -> CLIENT: 220 2.0.0 Ready to start TLS
    
    2020-12-24 09:20:36 Connection failed. Error #2: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol [/var/www/webpa/wp-includes/PHPMailer/SMTP.php line 426]
    
    SMTP Error: Could not connect to SMTP host.
    
    2020-12-24 09:20:36 CLIENT -> SERVER: QUIT
    

    Hi @duttoluca,

    Thanks for the details. It looks like your server does not support the required TLS version and therefore cannot establish the connection. Unfortunately, we don’t have any control over this and you’ll need to contact your server support to fix the problem.

    Please note that disabling SSL verification is not recommended – it’s compromising your security.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unable to send email, ssl error?’ is closed to new replies.