Support » Plugin: Gmail SMTP » After upgrade from PHP7.2 to PHP7.3 the plugin doesnt work anymore

  • Resolved Konijntje

    (@konijntje)


    Hi all,

    I have recently updated the PHP version from 7.2 to 7.3.
    After the update I can’t send (test) email anymore, while before I can.

    This is the Test Email log:

    2020-04-07 11:56:07 Connection: opening to smtp.gmail.com:587, timeout=300, options=array ()
    2020-04-07 11:56:07 Connection: opened
    2020-04-07 11:56:07 SMTP -> get_lines(): $data is ""
    2020-04-07 11:56:07 SMTP -> get_lines(): $str is "220 smtp.gmail.com ESMTP t124sm2097020wmf.19 - gsmtp"
    2020-04-07 11:56:07 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP t124sm2097020wmf.19 - gsmtp
    2020-04-07 11:56:07 CLIENT -> SERVER: EHLO xxxxxx.domain.com
    2020-04-07 11:56:07 SMTP -> get_lines(): $data is ""
    2020-04-07 11:56:07 SMTP -> get_lines(): $str is "250-smtp.gmail.com at your service, [2a01:7c8:aab5:20d::1]"
    2020-04-07 11:56:07 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2a01:7c8:aab5:20d::1]"
    2020-04-07 11:56:07 SMTP -> get_lines(): $str is "250-SIZE 35882577"
    2020-04-07 11:56:07 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2a01:7c8:aab5:20d::1]250-SIZE 35882577"
    2020-04-07 11:56:07 SMTP -> get_lines(): $str is "250-8BITMIME"
    2020-04-07 11:56:07 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2a01:7c8:aab5:20d::1]250-SIZE 35882577250-8BITMIME"
    2020-04-07 11:56:07 SMTP -> get_lines(): $str is "250-STARTTLS"
    2020-04-07 11:56:07 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2a01:7c8:aab5:20d::1]250-SIZE 35882577250-8BITMIME250-STARTTLS"
    2020-04-07 11:56:07 SMTP -> get_lines(): $str is "250-ENHANCEDSTATUSCODES"
    2020-04-07 11:56:07 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2a01:7c8:aab5:20d::1]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES"
    2020-04-07 11:56:07 SMTP -> get_lines(): $str is "250-PIPELINING"
    2020-04-07 11:56:07 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2a01:7c8:aab5:20d::1]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING"
    2020-04-07 11:56:07 SMTP -> get_lines(): $str is "250-CHUNKING"
    2020-04-07 11:56:07 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2a01:7c8:aab5:20d::1]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING"
    2020-04-07 11:56:07 SMTP -> get_lines(): $str is "250 SMTPUTF8"
    2020-04-07 11:56:07 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [2a01:7c8:aab5:20d::1]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
    2020-04-07 11:56:07 CLIENT -> SERVER: STARTTLS
    2020-04-07 11:56:07 SMTP -> get_lines(): $data is ""
    2020-04-07 11:56:07 SMTP -> get_lines(): $str is "220 2.0.0 Ready to start TLS"
    2020-04-07 11:56:07 SERVER -> CLIENT: 220 2.0.0 Ready to start TLS
    2020-04-07 11:56:07 CLIENT -> SERVER: EHLO xxxxxx.domain.com
    2020-04-07 11:56:07 SMTP -> get_lines(): $data is ""
    2020-04-07 11:56:07 SMTP -> get_lines(): $str is "250-smtp.gmail.com at your service, [2a01:7c8:aab5:20d::1]"
    2020-04-07 11:56:07 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2a01:7c8:aab5:20d::1]"
    2020-04-07 11:56:07 SMTP -> get_lines(): $str is "250-SIZE 35882577"
    2020-04-07 11:56:07 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2a01:7c8:aab5:20d::1]250-SIZE 35882577"
    2020-04-07 11:56:07 SMTP -> get_lines(): $str is "250-8BITMIME"
    2020-04-07 11:56:07 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2a01:7c8:aab5:20d::1]250-SIZE 35882577250-8BITMIME"
    2020-04-07 11:56:07 SMTP -> get_lines(): $str is "250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH"
    2020-04-07 11:56:07 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2a01:7c8:aab5:20d::1]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH"
    2020-04-07 11:56:07 SMTP -> get_lines(): $str is "250-ENHANCEDSTATUSCODES"
    2020-04-07 11:56:07 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2a01:7c8:aab5:20d::1]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES"
    2020-04-07 11:56:07 SMTP -> get_lines(): $str is "250-PIPELINING"
    2020-04-07 11:56:07 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2a01:7c8:aab5:20d::1]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING"
    2020-04-07 11:56:07 SMTP -> get_lines(): $str is "250-CHUNKING"
    2020-04-07 11:56:07 SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [2a01:7c8:aab5:20d::1]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING"
    2020-04-07 11:56:07 SMTP -> get_lines(): $str is "250 SMTPUTF8"
    2020-04-07 11:56:07 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [2a01:7c8:aab5:20d::1]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
    2020-04-07 11:56:07 Auth method requested: XOAUTH2
    2020-04-07 11:56:07 Auth methods available on the server: LOGIN,PLAIN,XOAUTH2,PLAIN-CLIENTTOKEN,OAUTHBEARER,XOAUTH
    SMTP Error: Could not authenticate.
    2020-04-07 11:56:07 CLIENT -> SERVER: QUIT
    2020-04-07 11:56:07 SMTP -> get_lines(): $data is ""
    2020-04-07 11:56:07 SMTP -> get_lines(): $str is "221 2.0.0 closing connection t124sm2097020wmf.19 - gsmtp"
    2020-04-07 11:56:07 SERVER -> CLIENT: 221 2.0.0 closing connection t124sm2097020wmf.19 - gsmtp
    2020-04-07 11:56:07 Connection: closed
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

    Server info:

    OS: Linux xxxx.domain.com 3.10.0-1062.12.1.el7.x86_64 #1 SMP Tue Feb 4 23:02:59 UTC 2020 x86_64
    PHP version: 7.3.16
    WordPress version: 5.4
    WordPress multisite: No
    openssl: Available
    allow_url_fopen: Enabled
    stream_socket_client: Available
    fsockopen: Available
    cURL: Available
    cURL Version: 7.69.1, OpenSSL/1.0.2k-fips
    

    If I switch back to PHP7.2, then I can send e-mails without problem.

    So, why does WP Gmail SMTP not work with PHP7.3 ?

    Please help me out, Thanks in advance!

    • This topic was modified 1 year, 5 months ago by Konijntje.
    • This topic was modified 1 year, 5 months ago by Konijntje.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Konijntje

    (@konijntje)

    If I switch back to PHP 7.2 php-fpm (via PHP Version Selector in DirectAdmin), then the problem is solved.

    But I prefer to use PHP 7.3….

    Why can I send emails in PHP 7.2 but not in PHP 7.3.
    In PHP 7.3 I get this error: “SMTP Error: Could not authenticate.” (see logs above)

    Can anyone please help me?

    • This reply was modified 1 year, 5 months ago by Konijntje.
    • This reply was modified 1 year, 5 months ago by Konijntje.

    I also saw this when testing a solution for a Contact Page theme bug and the local server was running PHP 7.3.1. For debugging reasons I switched to 7.2.14, as the bug wasn’t removed and that particular problem was gone then, as initially expected.

    Note though that in my case Woocommerce messages and test emails from the Gmail SMTP test page worked also under PHP 7.3.

    Thread Starter Konijntje

    (@konijntje)

    @magdamunro Thanks for your reply!

    Can it have something to do with the PHP7.3-configuration?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘After upgrade from PHP7.2 to PHP7.3 the plugin doesnt work anymore’ is closed to new replies.