• Resolved rajaman

    (@rajaman)


    Although SMTP status in the plugin’s settings is green (i.e. connected), sending a test email doesn’t work. And there’s no error message.

    I’ve tried TLS 587 as well as SSL 465.

    Any idea what the problem might be and how to fix it?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Noor Alam

    (@naa986)

    Hi, What really happens when you send a test email? Please copy and paste content from your “Server Info” tab so I can take a look.

    • This reply was modified 9 years, 7 months ago by Noor Alam.
    • This reply was modified 9 years, 7 months ago by Noor Alam.
    Thread Starter rajaman

    (@rajaman)

    Thanks for your reply.

    Below I’ll post the “Server Info” as well as the info that appears after sending a test email.

    Does that help to identify the problem?

    Server Info Tab

    OS: Linux h2410908.stratoserver.net 3.13.0-042stab111.12 #1 SMP Thu Sep 17 11:38:20 MSK 2015 x86_64
    PHP version: 5.5.9-1ubuntu4.20
    WordPress version: 4.6.1
    WordPress multisite: No
    openssl: Available
    allow_url_fopen: Enabled
    stream_socket_client: Available
    fsockopen: Available

    Test Email Tab

    Connection: opening to smtp.gmail.com:587, timeout=300, options=array ()
    Connection: opened
    SMTP -> get_lines(): $data is “”
    SMTP -> get_lines(): $str is “220 smtp.gmail.com ESMTP ia7sm11636076wjb.23 – gsmtp”
    SERVER -> CLIENT: 220 smtp.gmail.com ESMTP ia7sm11636076wjb.23 – gsmtp
    CLIENT -> SERVER: EHLO vegan.ch
    SMTP -> get_lines(): $data is “”
    SMTP -> get_lines(): $str is “250-smtp.gmail.com at your service, [2a01:238:42e8:f000:a0ec:5bd5:7e01:1a96]”
    SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [2a01:238:42e8:f000:a0ec:5bd5:7e01:1a96]”
    SMTP -> get_lines(): $str is “250-SIZE 35882577”
    SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [2a01:238:42e8:f000:a0ec:5bd5:7e01:1a96]250-SIZE 35882577”
    SMTP -> get_lines(): $str is “250-8BITMIME”
    SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [2a01:238:42e8:f000:a0ec:5bd5:7e01:1a96]250-SIZE 35882577250-8BITMIME”
    SMTP -> get_lines(): $str is “250-STARTTLS”
    SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [2a01:238:42e8:f000:a0ec:5bd5:7e01:1a96]250-SIZE 35882577250-8BITMIME250-STARTTLS”
    SMTP -> get_lines(): $str is “250-ENHANCEDSTATUSCODES”
    SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [2a01:238:42e8:f000:a0ec:5bd5:7e01:1a96]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES”
    SMTP -> get_lines(): $str is “250-PIPELINING”
    SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [2a01:238:42e8:f000:a0ec:5bd5:7e01:1a96]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING”
    SMTP -> get_lines(): $str is “250-CHUNKING”
    SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [2a01:238:42e8:f000:a0ec:5bd5:7e01:1a96]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING”
    SMTP -> get_lines(): $str is “250 SMTPUTF8”
    SERVER -> CLIENT: 250-smtp.gmail.com at your service, [2a01:238:42e8:f000:a0ec:5bd5:7e01:1a96]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
    CLIENT -> SERVER: STARTTLS
    SMTP -> get_lines(): $data is “”
    SMTP -> get_lines(): $str is “220 2.0.0 Ready to start TLS”
    SERVER -> CLIENT: 220 2.0.0 Ready to start TLS
    CLIENT -> SERVER: EHLO vegan.ch
    SMTP -> get_lines(): $data is “”
    SMTP -> get_lines(): $str is “250-smtp.gmail.com at your service, [2a01:238:42e8:f000:a0ec:5bd5:7e01:1a96]”
    SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [2a01:238:42e8:f000:a0ec:5bd5:7e01:1a96]”
    SMTP -> get_lines(): $str is “250-SIZE 35882577”
    SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [2a01:238:42e8:f000:a0ec:5bd5:7e01:1a96]250-SIZE 35882577”
    SMTP -> get_lines(): $str is “250-8BITMIME”
    SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [2a01:238:42e8:f000:a0ec:5bd5:7e01:1a96]250-SIZE 35882577250-8BITMIME”
    SMTP -> get_lines(): $str is “250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH”
    SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [2a01:238:42e8:f000:a0ec:5bd5:7e01:1a96]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH”
    SMTP -> get_lines(): $str is “250-ENHANCEDSTATUSCODES”
    SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [2a01:238:42e8:f000:a0ec:5bd5:7e01:1a96]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES”
    SMTP -> get_lines(): $str is “250-PIPELINING”
    SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [2a01:238:42e8:f000:a0ec:5bd5:7e01:1a96]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING”
    SMTP -> get_lines(): $str is “250-CHUNKING”
    SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [2a01:238:42e8:f000:a0ec:5bd5:7e01:1a96]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING”
    SMTP -> get_lines(): $str is “250 SMTPUTF8”
    SERVER -> CLIENT: 250-smtp.gmail.com at your service, [2a01:238:42e8:f000:a0ec:5bd5:7e01:1a96]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
    Auth method requested: XOAUTH2
    Auth methods available on the server: LOGIN,PLAIN,XOAUTH2,PLAIN-CLIENTTOKEN,OAUTHBEARER,XOAUTH
    CLIENT -> SERVER: QUIT
    SMTP -> get_lines(): $data is “”
    SMTP -> get_lines(): $str is “221 2.0.0 closing connection ia7sm11636076wjb.23 – gsmtp”
    SERVER -> CLIENT: 221 2.0.0 closing connection ia7sm11636076wjb.23 – gsmtp
    Connection: closed

    Plugin Author Noor Alam

    (@naa986)

    Thanks. The log actually looks fine. I’m not sure why the email is not arriving in your inbox. Did you check the spam folder?

    Thread Starter rajaman

    (@rajaman)

    Thanks for your response.

    I couldn’t find any error messages either, that’s why the whole thing seems so strange. I did countless tests and no mail was ever sent. And yes, I checked the spam folder as well.

    Today, after resetting the plugin (i.e. entering and saving all the settings anew), I’m surprised and delighted that the plugin finally works again. I have no idea what the problem was, but now the test email function as well as form submissions work correctly again. 🙂

    I am having exact same issue, how do I reset the plugin? Even if I delete all settings or reinstall the plugin it still says connected and nothing works.

    I also tried to use other google account for this, but after entering all the settings Grant Permission button does not show up.

    • This reply was modified 9 years, 7 months ago by Cigaras.
    • This reply was modified 9 years, 7 months ago by Cigaras.

    I found plugins options in database, option_name=gmail_smtp_options, deleted it and plugin went to off, filled in all the required information, granted permissions, server information looks like this:

    OS: Windows NT SERVERIS 10.0 build 14393 (Windows 10) i586
    PHP version: 7.0.12
    WordPress version: 4.6.1
    WordPress multisite: No
    openssl: Available
    allow_url_fopen: Enabled
    stream_socket_client: Available
    fsockopen: Available

    Test email result:

    Connection: opening to smtp.gmail.com:587, timeout=300, options=array ()
    Connection: opened
    SMTP -> get_lines(): $data is ""
    SMTP -> get_lines(): $str is "220 smtp.gmail.com ESMTP c10sm3392184ljd.38 - gsmtp"
    SERVER -> CLIENT: 220 smtp.gmail.com ESMTP c10sm3392184ljd.38 - gsmtp
    CLIENT -> SERVER: EHLO apsaugeles.lt
    SMTP -> get_lines(): $data is ""
    SMTP -> get_lines(): $str is "250-smtp.gmail.com at your service, [84.240.48.202]"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [84.240.48.202]"
    SMTP -> get_lines(): $str is "250-SIZE 35882577"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [84.240.48.202]250-SIZE 35882577"
    SMTP -> get_lines(): $str is "250-8BITMIME"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [84.240.48.202]250-SIZE 35882577250-8BITMIME"
    SMTP -> get_lines(): $str is "250-STARTTLS"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [84.240.48.202]250-SIZE 35882577250-8BITMIME250-STARTTLS"
    SMTP -> get_lines(): $str is "250-ENHANCEDSTATUSCODES"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [84.240.48.202]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES"
    SMTP -> get_lines(): $str is "250-PIPELINING"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [84.240.48.202]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING"
    SMTP -> get_lines(): $str is "250-CHUNKING"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [84.240.48.202]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING"
    SMTP -> get_lines(): $str is "250 SMTPUTF8"
    SERVER -> CLIENT: 250-smtp.gmail.com at your service, [84.240.48.202]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
    CLIENT -> SERVER: STARTTLS
    SMTP -> get_lines(): $data is ""
    SMTP -> get_lines(): $str is "220 2.0.0 Ready to start TLS"
    SERVER -> CLIENT: 220 2.0.0 Ready to start TLS
    CLIENT -> SERVER: EHLO apsaugeles.lt
    SMTP -> get_lines(): $data is ""
    SMTP -> get_lines(): $str is "250-smtp.gmail.com at your service, [84.240.48.202]"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [84.240.48.202]"
    SMTP -> get_lines(): $str is "250-SIZE 35882577"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [84.240.48.202]250-SIZE 35882577"
    SMTP -> get_lines(): $str is "250-8BITMIME"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [84.240.48.202]250-SIZE 35882577250-8BITMIME"
    SMTP -> get_lines(): $str is "250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [84.240.48.202]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH"
    SMTP -> get_lines(): $str is "250-ENHANCEDSTATUSCODES"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [84.240.48.202]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES"
    SMTP -> get_lines(): $str is "250-PIPELINING"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [84.240.48.202]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING"
    SMTP -> get_lines(): $str is "250-CHUNKING"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [84.240.48.202]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING"
    SMTP -> get_lines(): $str is "250 SMTPUTF8"
    SERVER -> CLIENT: 250-smtp.gmail.com at your service, [84.240.48.202]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
    Auth method requested: XOAUTH2
    Auth methods available on the server: LOGIN,PLAIN,XOAUTH2,PLAIN-CLIENTTOKEN,OAUTHBEARER,XOAUTH
    CLIENT -> SERVER: QUIT
    SMTP -> get_lines(): $data is ""
    SMTP -> get_lines(): $str is "221 2.0.0 closing connection c10sm3392184ljd.38 - gsmtp"
    SERVER -> CLIENT: 221 2.0.0 closing connection c10sm3392184ljd.38 - gsmtp
    Connection: closed

    But neither test email nor other emails reach the recipients

    Thank You for reply @naa986, I host it myself, and I am pretty sure there are no outgoing connection restrictions as it used to work before, or does the incoming (or inbound, not sure about right terminology) port needs be also open? I mean, do I need to add a port forwarding rule to my router for port 587?

    I looked into Apache logs and found this:

    [Sat Nov 12 21:07:12.606091 2016] [:error] [pid 3976:tid 1840] [client 192.168.1.1:55375] PHP Fatal error:  Uncaught Error: Call to undefined function curl_init() in ***\\wp-content\\plugins\\gmail-smtp\\class.phpmaileroauthgoogle.php:171
    Stack trace:
    #0 ***\\wp-content\\plugins\\gmail-smtp\\class.phpmaileroauthgoogle.php(151): GmailXOAuth2->request_offline_token()
    #1 ***\\wp-content\\plugins\\gmail-smtp\\PHPMailer\\class.smtp.php(446): GmailXOAuth2->getOauth64()
    #2 ***\\wp-content\\plugins\\gmail-smtp\\class.phpmaileroauth.php(152): SMTP->authenticate('', '', 'XOAUTH2', '', '', Object(GmailXOAuth2))
    #3 ***\\wp-content\\plugins\\gmail-smtp\\PHPMailer\\class.phpmailer.php(1463): PHPMailerOAuth->smtpConnect(Array)
    #4 ***\\wp-content\\plugins\\gmail-smtp\\PHPMailer\\class.phpmailer.php(1300): PHPMailer->smtpSend('Date: Sat, 12 N...', 'Test\\n')
    #5 ***\\wp-content\\plugins\\gmail-smtp\\PHPMai in ***\\wp-content\\plugins\\gmail-smtp\\class.phpmaileroauthgoogle.php on line 171, referer: http://apsaugeles.lt/wp-admin/options-general.php?page=gmail-smtp-settings&action=test-email

    php_curl.dll extension is enabled in php.ini

    • This reply was modified 9 years, 6 months ago by Cigaras.

    But curl is not shown in phpinfo(), there is something wrong with my server configuration…

    Plugin Author Noor Alam

    (@naa986)

    That might be the issue here. So curl is not installed on your server? or is it not configured correctly?

    Yeah, there is something wrong with the WAMP software I am using, when running as a service curl for some reason wouldn’t load, found a workaround for that, Gmail SMTP now works, sorry for bothering 🙂

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Test email not working’ is closed to new replies.