• Resolved Titi

    (@thibotus01)


    Hi,

    Updated to 1.2.2 – GMAIL method still doesn’t work. Once we auhtorized thru the Gmail window, we get back to the plugin page but there is no confirmation. The button link “Allow plugin…” is still present.

    Here the debug of test email:

    There was a problem while sending a test email. Related debugging output is shown below:

    Versions:
    WordPress: 4.9.1
    WordPress MS: No
    PHP: 7.0.11
    WP Mail SMTP: 1.2.2

    Params:
    Mailer: gmail
    Constants: No
    Client ID/Secret: Yes
    Auth Code: No
    Access Token: No

    Server:
    OpenSSL: Yes
    PHP.allow_url_fopen: Yes
    PHP.stream_socket_client(): Yes
    PHP.fsockopen(): Yes
    PHP.curl_version(): Yes

    Debug:
    Error while sending via Gmail mailer: {
    “error”: {
    “errors”: [
    {
    “domain”: “global”,
    “reason”: “required”,
    “message”: “Login Required”,
    “locationType”: “header”,
    “location”: “Authorization”
    }
    ],
    “code”: 401,
    “message”: “Login Required”
    }
    }

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Slava Abakumov

    (@slaffik)

    Hi,

    You have not configured the Gmail mailer yet. You don’t have auth code, that your site receives from google after you go from all the steps after clicking the Allow… button.
    I assume you have clicked it. Where are you redirected to when you go through auth process and allowing Google an app to send requests for you?

    Thread Starter Titi

    (@thibotus01)

    Hi,

    Your statement is wrong. As I said and I already said in multiple previous topics. I have went thru all the process with GMAIL. I set up the Auth code.

    When I click I’m redirected to Google that ask me permissions. I accept, then it goes back to the plugin page.

    The plugin works fine on another hosting. For some reasons that I can’t explain. When I get back from Google, the button “Allow plugin…” is not present anymore. That’s the only difference.

    Plugin Author Slava Abakumov

    (@slaffik)

    Auth Code: No

    That means, that auth code is NOT saved in your database. Without it – plugin can’t generate Access Token (which is No to in your debug).

    So the issue is that when you return from Google – auth code is not saved for some reason.

    As I don’t see Apache.mod_rewrite() debug string, I assume that you are NOT using Apache at all. Most likely, it’s Nginx. Am I correct here?

    When I get back from Google, the button “Allow plugin…” is not present anymore.

    Is it on a hosting which has a problem or which works fine? This button disappears when both Client ID/Secret are saved AND there is an access token.

    Are you using any kind of caching? Try to disable all caching plugins and try again.

    Thread Starter Titi

    (@thibotus01)

    I’m not sure this is Nginx nor Apache. My hosting use Varnish as cache system as well as multilayer adaptive caching engines.
    This is enterprise hosting: https://pressidium.com/technology/

    But WP-ADMIN is outside of the cache system and no page in WP-ADMIN is cached. So it shouldn’t be related.

    The button is gone on the hosting that works fine.

    again here the reply from my hosting after some investigation:

    Well as far as I can see this is pointing to a bug with the plugin, as there is no error being logged either in the server logs, nor in WP_Debug logs (I’ve now disabled WP-Debug).

    In either case please contact WP-SMTP support to report the issue and seek further assistance as it doesn’t look like something on our side.

    Plugin Author Slava Abakumov

    (@slaffik)

    The button is gone on the hosting that works fine.

    That means all is good. You won’t see that button again unless you switch between mailers.

    As you said, the plugin works on another hosting. As it doesn’t work on Pressidium – that means that the issue is with their server setup and how the plugin handles it. It seems being non-standard comparing to a vast majority of other users of WP Mail SMTP plugin, and I can’t think of any tweaks I need to do to make it work on their setup.

    If you’d like – ask them to join here in the topic to discuss further. Without their assistance, I won’t be able to identify the problem. Right now I think about load balancer sending requests to a different server OR caching problems.

    Thread Starter Titi

    (@thibotus01)

    I contacted again my hosting, they did some testing and investigation here their reply:

    —-
    As promised I tried to setup the plugin on a vanilla (fresh) install.

    Authenticating the mentioned plugin failed with the following error http://prntscr.com/ht5iq4 (no specific error or something to look after).

    So, I’ve installed another popular plugin (https://wordpress.org/plugins/gmail-smtp/) and using the same exact “Google Application” I was able to successfully grant the OAuth2 token and send emails via Google, see :

    1) http://prntscr.com/ht5f1m
    2) http://prntscr.com/ht5gqo
    ——

    Thread Starter Titi

    (@thibotus01)

    Do you have an update?

    Thank you, Thibault

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @thibotus01 I’ve removed your new duplicate topic. Don’t do that, it makes it harder for volunteers such as the plugin author to help you when you do that.

    Thread Starter Titi

    (@thibotus01)

    I have tried the plugin on KINSTA hosting which is a competitor to pressidium. Another similar managed WP hosting.
    The issue is the exact same.

    Edit: My apologize, I have tried again by saving and authorizing again, and it’s working on Kinsta!

    • This reply was modified 6 years, 3 months ago by Titi.
    Plugin Author Slava Abakumov

    (@slaffik)

    Your FROM email address in plugin settings should be the same as the one you have used to create a Google App in Console with Gmail API to get Client ID/Secret.

    @thibotus01,

    Am I correct, that the issue is fixed for you know? Or you have just wrote to say that that works on Kinsta?

    Thread Starter Titi

    (@thibotus01)

    It works on Kinsta but the issue remains with Pressidium. I’m not with Pressidium anymore so I can’t test further.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘1.2.2 – Gmail error’ is closed to new replies.