• Resolved ivitae

    (@ivitae)


    Hi,

    I am using WP Mail SMTP and configured it to send emails to my gmail account using the “Other SMTP” mailer option.

    Originally everything was working fine and emails were successfully sent, however I recently noticed that the emails are not sent anymore.

    When trying to send a test email from the WP Mail SMTP admin screen, I get the following error log:

    Versions:
    WordPress: 5.2.2
    WordPress MS: No
    PHP: 7.0.33-0ubuntu0.16.04.5
    WP Mail SMTP: 1.5.2
    
    Params:
    Mailer: smtp
    Constants: No
    ErrorInfo: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    Host: smtp.gmail.com
    Port: 465
    SMTPSecure: ssl
    SMTPAutoTLS: bool(true)
    SMTPAuth: bool(true)
    
    Server:
    OpenSSL: OpenSSL 1.0.2g 1 Mar 2016
    Apache.mod_security: No
    SMTP Debug:
    2019-08-10 22:05:02	Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array (
    )
    2019-08-10 22:05:02	Connection: Failed to connect to server. Error number 2. "Error notice: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
    error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
    2019-08-10 22:05:02	Connection: Failed to connect to server. Error number 2. "Error notice: stream_socket_client(): Failed to enable crypto
    2019-08-10 22:05:02	Connection: Failed to connect to server. Error number 2. "Error notice: stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error)
    2019-08-10 22:05:02	SMTP ERROR: Failed to connect to server: (0)
    2019-08-10 22:05:02	SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

    Will appreciate any assistance/guidance with resolving this.

    Thanks,

    Amir.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m also facing same issue..

    
    
    Versions:
    WordPress: 5.2.2
    WordPress MS: No
    PHP: 7.2.7
    WP Mail SMTP: 1.5.2
    
    Params:
    Mailer: smtp
    Constants: No
    ErrorInfo: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    Host: smtp.gmail.com
    Port: 465
    SMTPSecure: ssl
    SMTPAutoTLS: bool(true)
    SMTPAuth: bool(true)
    
    Server:
    OpenSSL: OpenSSL 1.1.0h  27 Mar 2018
    Apache.mod_security: No
    SMTP Debug:
    
    2019-08-11 12:31:21	Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array (
                       	                  )
    2019-08-11 12:31:22	Connection: Failed to connect to server. Error number 2. "Error notice: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
                       	                  error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
    2019-08-11 12:31:22	Connection: Failed to connect to server. Error number 2. "Error notice: stream_socket_client(): Failed to enable crypto
    2019-08-11 12:31:22	Connection: Failed to connect to server. Error number 2. "Error notice: stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error)
    2019-08-11 12:31:22	SMTP ERROR: Failed to connect to server:  (0)
    2019-08-11 12:31:22	SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    • This reply was modified 5 years, 2 months ago by pragnadeep.

    Hi @pragnadeep, @ivitae

    The error indicates the issue with your certificate that your web server is serving. Please contact your hosting company support to fix the certificate of a server for you. Alternatively, you can disable the certificate verify with the custom codes. You should not do this unless you have to – it’s compromising your security.

    I hope this helps!

    Thread Starter ivitae

    (@ivitae)

    Thanks @sanzeeb3 for the reply.

    I am using a localhost site – currently in development stage. Is there some way I can fix or replace the certificate being used ? As mentioned, email were sent successfully in the past.

    Hi @ivitae,

    For the development site, you can disable the SSL verification for PHP 5.6 or higher by adding this custom codes. For the live sites, I recommend to not use this approach because it’s compromising the security, instead contact your hosting provider to get the valid certificates.

    In case it helps, here’s the tutorial on how to add the custom codes like this.

    I hope this helps!

    Thread Starter ivitae

    (@ivitae)

    Thanks @sanzeeb3 !

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Failed to send test email’ is closed to new replies.