Support » Plugin: WP Mail SMTP by WPForms » Possible cache or cookie issue when connecting to G Suite

  • Resolved pikamander2

    (@pikamander2)


    We were trying to connect WP Mail SMTP to G Suite, but it wasn’t working. We kept getting a 403 org_internal error (“This client is restricted to users within its organization”).

    We had followed your official guide, but had forgotten to do one of the steps (I forget which, unfortunately). After fixing that though, the plugin was still giving that error. I tried it several times but it kept throwing the same error.

    Finally, I tried it in a fresh session (Incognito), and it worked on the first try. So it seems like there might have been some kind of cache or cookie related issue going on.

    The rough steps for reproduction are:

    1. Set up a G Suite app for your website, but skip an important step or two

    2. Try to connect WP Mail SMTP to G Suite

    3. Receive a 403 error

    4. Fix the missing details

    5. Try to connect it again

    6. Still receive a 403 error

    If nothing else, it might be worth adding that possibility to your guide. I don’t see anything about the 403 error in your troubleshooting steps, which makes it hard to know what to do to fix it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Sanjeev Aryal

    (@sanzeeb3)

    Hi @pikamander2,

    Thanks for the information. 403 is an authentication error. The Google account you tried to allow to send email doesn’t have access to the App you created. After you fix the client ID and client secret, you may have not saved the settings (to refresh the client ID and secret) and tried to Allow to send emails with the same old settings you had. The solution is after you fix the client ID and secret, you’ll need to save your settings.

    I hope this helps!

    Thread Starter pikamander2

    (@pikamander2)

    @sanzeeb3 – I tried saving my settings, re-entering the client ID/secret, and/or refreshing the page a number of times to no avail, so I’m pretty sure that none of those things were the issue.

    I’ll be setting up another site soon, so I might be able to confirm the reproduction steps then.

    Plugin Support Sanjeev Aryal

    (@sanzeeb3)

    Hi @pikamander2 – We haven’t heard from you in about a week, so I’m going to go ahead and mark this ticket resolved. If you still have questions, though, please feel welcome to continue the conversation.

    Thread Starter pikamander2

    (@pikamander2)

    @sanzeeb3 – I was able to reproduce this issue with another website.

    To encounter the bug:

    1. Create an Oauth key
    2. Don’t set the Authorized redirect URIs
    3. Click the “Allow plugin to send emails using your Google account” button in WP Mail SMTP
    4. You’ll receive the above 403 error, which is correct.
    5. Set the Authorized redirect URI and click Save.
    6. Even after refreshing the WP Mail SMTP page, you’ll continue to receive the 403 error even though your G Suite settings are now correct.

    Once again, I had to switch to Incognito mode to fix it. So there’s definitely some kind of caching/cookie going on.

    Plugin Support Sanjeev Aryal

    (@sanzeeb3)

    Hi @pikamander2 – Thanks for the steps. However, I am not able to reproduce the issue on the fresh WordPress installs with the steps. There might be a cache on your browser or your server, or it could be that the redirect URI is taking some time to reflect when you added in your Google APP.

    Have a good one.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Possible cache or cookie issue when connecting to G Suite’ is closed to new replies.