Support » Plugin: Postman SMTP Mailer/Email Log » Error: Unable to connect via TLS

  • McCage

    (@mccage)


    Hi,
    Today I had to update Contact Form 7. Testmessages did not send and error message appeared. Postman says: Unable to connect via TLS.

    Postman SMTP Setup Diagnostic Test Result:

    OS: Linux dded16a 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt9-3~deb8u1 (2015-04-24) x86_64
    PHP: Linux 5.6.20-0+deb8u1 C
    PHP Dependencies: iconv=Yes, spl_autoload=Yes, openssl=Yes, sockets=Yes, allow_url_fopen=Yes, mcrypt=Yes, zlib_encode=Yes
    WordPress: 4.5.2 nl_NL UTF-8
    WordPress Theme: Twenty Fifteen
    WordPress Plugins: AddToAny Share Buttons, Akismet, Contact Form 7, Postman SMTP, Stats Counter, Stream, WP Add Custom CSS
    WordPress wp_mail Filter(s): wp_staticize_emoji_for_email
    WordPress phpmailer_init Action(s): wpcf7_phpmailer_init
    Postman: 1.7.2
    Postman Sender Domain (Envelope|Message): edithdezwart.nl | edithdezwart.nl
    Postman Prevent Message Sender Override (Email|Name): No | No
    Postman Active Transport: SMTP (smtp:tls:crammd5://mail.edithdezwart.nl:587)
    Postman Active Transport Status (Ready|Connected): Yes | Yes
    Postman Deliveries (Success|Fail): 32 | 13

    Connection test says SMTP port 587 is OK

    https://wordpress.org/plugins/postman-smtp/

Viewing 9 replies - 1 through 9 (of 9 total)
  • I have the same Problem on 1.7.2. Did you find a solution?

    Plugin Author Jason Hendriks

    (@jasonhendriks)

    What’s the actual error message found in the Postman error log?

    Sorry, I’m not sure which error log you mean.
    To clarify about the error, I get exactly the same error message as the OP (Unable to connect via TLS) when I try to send a test message. Connection test works too. Only difference is that I don’t use Contact Form 7.

    Here are all the logs I know about:

    
    OS: Linux <em>server.domain.com</em> 3.10.0-427.10.1.lve1.4.19.el7.x86_64 #1 SMP Mon Oct 10 07:34:24 EDT 2016 x86_64
    PHP: Linux 7.0.13 C
    PHP Dependencies: iconv=Yes, spl_autoload=Yes, openssl=Yes, sockets=Yes, allow_url_fopen=No, mcrypt=Yes, zlib_encode=Yes
    WordPress: 4.6.1 de_DE UTF-8
    WordPress Theme: Twenty Sixteen
    WordPress Plugins: Postman SMTP
    WordPress wp_mail Filter(s): wp_staticize_emoji_for_email
    Postman: 1.7.2
    Postman Sender Domain (Envelope|Message): <em>domain.com</em> | <em>domain.com</em>
    Postman Prevent Message Sender Override (Email|Name): Yes | Yes
    Postman Active Transport: SMTP (smtp:tls:plain://<em>domain.com</em>:587)
    Postman Active Transport Status (Ready|Connected): Yes | Yes
    Postman Deliveries (Success|Fail): 0 | 0
    Postman Email Log (Enabled|Limit|Transcript Size): Yes | 16963 | 128
    Postman PHP LogLevel: 30000
    Postman Stealth Mode: Yes
    
    
    smtp:tls:plain://domain.com:587
    
    220 <em>mail.domain.com</em> ESMTP Postfix <em>Brand Name</em> NewMail
    EHLO localhost
    250-<em>mail.domain.com</em>
    250-PIPELINING
    250-SIZE 102400000
    250-ETRN
    250-STARTTLS
    250-AUTH PLAIN LOGIN
    250-AUTH=PLAIN LOGIN
    250 8BITMIME
    STARTTLS
    220 Ready to start TLS
    

    Text in italic are placeholders.

    • This reply was modified 4 years, 5 months ago by Nicolas Jeker.

    I think I got the error log that you meant now:

    
    [23-Nov-2016 19:30:10 UTC] PHP Warning:  stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
    error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /home/xyz/public_html/wp-content/plugins/postman-smtp/Postman/Postman-Mail/Zend-1.12.10/Mail/Protocol/Smtp.php on line 206
    [23-Nov-2016 19:30:10 UTC] ERROR PostmanWpMail: Exception code=0 message=Unable to connect via TLS
    [23-Nov-2016 19:30:42 UTC] ERROR PostmanSendTestEmailAjaxController: Test Email NOT delivered to server - 0
    
    Plugin Author Jason Hendriks

    (@jasonhendriks)

    Looks like the SSL3 cert was unable to be verified, hence the TLS failure.

    Either the server certificates are out of date (unlikely), or the client certificates are (likely). Can you update the OpenSSL library on your WordPress server?

    I am installing the production WordPress installation on a server for which I (sadly) have only minimal control over the installed software. phpinfo tells me that the OpenSSL version is 1.0.1e. The exact same version is installed on my development server, where everything works as expected.

    I’ll contact the hosting provider about this anyway and see if I can get this sorted.

    Also getting the same error. Where did you find the time tagged error log?

    Found it. For those wondering there is no “Postman error log”. I believe Author Jason H just meant the WP debug log. SSL3_GET_SERVER_CERTIFICATE:certificate verify failed was also my exact error, the same as Nicolas. It’s likely because we don’t have a signed certificate authority on our server yet. Doing so will likely fix this. (I hope)

    Yes, you are right, the WP debug log shows this error. Something was wrong with the mail provider’s certificate. You can check the certificate directly on a terminal with this command:
    openssl s_client -starttls smtp -crlf -connect example.com:587
    This was the output in my case (I truncated it to the relevant part at the beginning):

    CONNECTED(00000003)
    depth=0 /OU=GT12345678/OU=See www.rapidssl.com/resources/cps (c)15/OU=Domain Control Validated - RapidSSL(R)/CN=*.example.com
    verify error:num=20:unable to get local issuer certificate
    verify return:1
    depth=0 /OU=GT12345678/OU=See www.rapidssl.com/resources/cps (c)15/OU=Domain Control Validated - RapidSSL(R)/CN=*.example.com
    verify error:num=27:certificate not trusted
    verify return:1
    depth=0 /OU=GT12345678/OU=See www.rapidssl.com/resources/cps (c)15/OU=Domain Control Validated - RapidSSL(R)/CN=*.example.com
    verify error:num=21:unable to verify the first certificate
    verify return:1
    [...]
    
    • This reply was modified 4 years, 4 months ago by Nicolas Jeker.
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Error: Unable to connect via TLS’ is closed to new replies.