• Resolved aski71

    (@aski71)


    Since the update to 1.6.0 today sending emails via TLS or SSL does not work.
    This has been working for ages without problems.
    WP and postfix are running on the same ubuntu Plesk server.
    Nothing has been changed but the plugin.
    Thanks for any hints.

    Versions:
    WordPress: 5.2.2
    WordPress MS: No
    PHP: 7.0.33-0ubuntu0.16.04.6
    WP Mail SMTP: 1.6.0
    
    Params:
    Mailer: smtp
    Constants: No
    ErrorInfo: SMTP Error: Could not connect to SMTP host.
    Host: alexsebastian.de
    Port: 587
    SMTPSecure: tls
    SMTPAutoTLS: bool(true)
    SMTPAuth: bool(true)
    
    Server:
    OpenSSL: OpenSSL 1.0.2g 1 Mar 2016
    SMTP Debug:
    2019-08-27 17:30:52	Connection: opening to alexsebastian.de:587, timeout=300, options=array ( ) 2019-08-27 17:30:52	Connection: opened 2019-08-27 17:30:52	SERVER -> CLIENT: 220 h2779534.stratoserver.net ESMTP Postfix (Ubuntu) 2019-08-27 17:30:52	CLIENT -> SERVER: EHLO musoc.de 2019-08-27 17:30:52	SERVER -> CLIENT: 250-h2779534.stratoserver.net 250-PIPELINING 250-SIZE 20480000 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN 2019-08-27 17:30:52	CLIENT -> SERVER: STARTTLS 2019-08-27 17:30:52	SERVER -> CLIENT: 220 2.0.0 Ready to start TLS 2019-08-27 17:30:52	SMTP Error: Could not connect to SMTP host. 2019-08-27 17:30:52	CLIENT -> SERVER: QUIT 2019-08-27 17:30:52	SERVER -> CLIENT: MIA,.?X??????Z?L?v?op????{???????kef6~Pc|??Q$??fJj%?k?]??=? 4??W???s?=??x1?.???A???????d??7??$??&W1@??<?5n??g??B?E??p?T\?XUSsj???H??T?l?c??H\8 8h??J? ? ?#??T???V欰z??x3???????:??*?s?I+? ??](cS?4<&;s?s.??Q?.Z?d???,??#?????|]?Jf?,?Wk??YJM???K?6???????5K[?R8??g?*g ??j?3 2019-08-27 17:30:52	SMTP ERROR: QUIT command failed: MIA,.?X??????Z?L?v?op????{???????kef6~Pc|??Q$??fJj%?k?]??=? 4??W???s?=??x1?.???A???????d??7??$??&W1@??<?5n??g??B?E??p?T\?XUSsj???H??T?l?c??H\8 8h??J? ? ?#??T???V欰z??x3???????:??*?s?I+? ??](cS?4<&;s?s.??Q?.Z?d???,??#?????|]?Jf?,?Wk??YJM???K?6???????5K[?R8??g?*g ??j?3 2019-08-27 17:30:52	Connection: closed 2019-08-27 17:30:52	SMTP Error: Could not connect to SMTP host. 
    
Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi @aski71,

    The error indicates that it is unable to contact the SMTP server you have specified in the Host properly. This can be due to many reasons such as firewall blocking, DNS failure or any other issue on your local network. It can also be caused by not having the openssl extension loaded.

    Updating to 1.6.0 should not cause the issue as nothing is changed affecting the previous connection. You might need to contact your hosting provider where your website is hosted.

    I hope this helps!

    Thread Starter aski71

    (@aski71)

    Hi @sanzeeb3,

    I use my mailing host with several other SMTP and IMAP clients: They all work fine using TLS.

    WP and the postfix run on my vServer. So I can rule out the hosting provider. ??

    None of my other clients show any issues. All clients can send and receive emails properly, connecting to the server via the internet using TLS.
    All I can say is: Before updating to 1.6.0 everything worked smoothly. Since the update to 1.6.0 it doesn’t anymore.

    Checked the firewall on the server: No blocked ports. (If the ports were blocked this would also affect other clients, right? But all other clients work.)
    It’s also not a DNS failure or local network issue: Other clients work and setting the server (in WP Mail SMTP) to localhost (using TLS) does not solve the issue either.

    Setting WP Mail SMTP to unencrypted on port 25 with server localhost works fine.

    Just do double check: Where does the openssl extension need to be loaded? And how?
    Should not be an issue because it worked before. I just want to make sure.

    Thanks, Alex

    Hi @aski71,

    I apologize for the late response. Could you please confirm this is the issue only on version 1.6.0 and works fine on other previous versions? From which version you upgraded the plugin to 1.6.0? There’s nothing regarding SMTP was changed in 1.6.0 though.

    Thanks!

    Thread Starter aski71

    (@aski71)

    I usually update pretty quickly. So I updated from the most recent version.
    Maybe this is a strange coincidence, but I did not change anything else on my V-Server. The day after the update of the plugin it stopped working and users complained they were getting an error message.

    Thanks, Alex

    Thread Starter aski71

    (@aski71)

    Does this point to anything?

    AH01071: Got error 'PHP message: PHP Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:\nerror:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /var/www/vhosts/musoc.de/httpdocs/wp-includes/class-smtp.php on line 368', referer: https://musoc.de/wp-admin/admin.php?page=wp-mail-smtp&tab=test

    Might be related to me sending test mails via the plugins test mail function.

    Hi @aski71,

    The error you’ve posted is specifically related with the SSL certificate not accepted. When you get a chance could you please the verification with thiscustom code and try. You should not do this unless you have to – it’s compromising your security.

    In case it helps, here’s tutorial on where and how to add custom codes like that: https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/

    Thank You!

    Thread Starter aski71

    (@aski71)

    Hi @sanzeeb3,

    tried this custom code in the described way using the code snippets plugin.
    This is working.
    But I still don’t understand, why this is necessary?

    Do you have any hit, why the certificate is rejected by WP but works with any other client?

    Regards,
    Alex

    Hi Alex,

    You might have changed certificates on the sender (the server that is used to send an email from your WP install) or your SMTP traffic is redirected to a different server. Make sure both servers (sender and receiver) are using TLS v1.2 or higher, same protocol. For more details read the documentation about the issue.

    Thanks!

    Thread Starter aski71

    (@aski71)

    Hi sanzeeb3,

    the server is managed by Plesk and certificated are generated and renewed by LetsEncrypt. I don’t do anything in addition. This worked for more than a year now. So I’m a little confused. Will have a look into the documentation provided above with a little more time in the next days.

    In addition:
    Today I found that another plugin that uses WP Mail SMTP is still not working.
    It’s called Events Manager. Within the email settings I tell it to use WP Mail. When I hit the “test mail” button, all works fine and the test mail goes out.
    When the plugin Events Manager tries to send an email from front end interaction of a user, it fails.

    When I change the settings of Events Manager to use “PHP Mail Function” instead of “WP Mail” it also works from the front end.

    Any idea?

    Hi Alex @aski71,

    I just tried adding the Events Manager to my local site so that I could test what you’ve described.

    However, as long as I leave their default “WP Mail” option for this setting everything seems to work correctly.

    In case it helps, I can see this in the email headers. I’m sending to a G Suite email, and also currently using the Gmail mailer in WP Mail SMTP. So if I open the original booking message from within Gmail to check out the headers, here’s what I see: https://cloud.supportally.com/d5ef0f4e92df

    I couldn’t say why any of their emails seem to send right now, but the good news is that these results suggest to me that you shouldn’t have any issues once your SMTP issues are resolved (as long as you use that plugin’s “WP Mail” option).

    If you haven’t had luck sorting out those server issues yet, I’d recommend using one of our API-based mailers instead. The “Other SMTP” option that I see being used above is super sensitive to server configuration issues, and as you’ve seen these can be pretty challenging to sort out (and further, are beyond our support scope since they’re in your server).

    However, the transactional API-based services (in our free version, Sendinblue, Mailgun, and SendGrid) will generally avoid these issues. They do the heavy lifting on their end, and these services are designed specifically to send emails that deliver successfully. Plus, each have free options as long as you have relatively low sending needs.

    If you’d like to see more details on these mailers, here’s our complete guide. That shares highlights on each, and also links out to step by step setup tutorials.

    I hope this helps!

    Thread Starter aski71

    (@aski71)

    Hi,

    I had the time today to review the documentation link shared by @sanzeeb3 three posts above.
    Obviously the cacerts were not linked in my system.
    I was able to resolve this problem by following the instructions under “Updating CA certificates” and adding the correct location of the cacert.pem to my php.ini.
    Now it works again.

    Thanks for your help!

    Best regards,
    Alex

    Hi Alex,

    Glad to know that, and thanks for taking time to let us know.

    Have a good one !:)

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘TLS mail no longer working after last update’ is closed to new replies.