Support » Plugin: WP Mail SMTP by WPForms » Gmail 403

  • Resolved Jason Chong

    (@dantianhealth)


    I am trying to setup Gmail for an account. I have setup the OAuth etc as directed and have checked through GSuite for permissions and double checked my entry of keys and passwords etc but each time I try and authenticate I get a 403
    Forbidden
    Access to this resource on the server is denied!
    What am I missing?

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

    (@sanzeeb3)

    Hi @dantianhealth,

    Thanks for reaching out! Are you getting this error after clicking on ‘Allow plugin to..’ and redirecting back to your site after authenticating your Google account? This can be due to security prevention from your hosting company. Most probably, mod_security apache module, it filters out certain requests and redirects them to a 404 page. You will need to contact your hosting company support team and ask to modify the mod_security rule to allow incoming requests from Google.

    I hope this helps!

    Thread Starter Jason Chong

    (@dantianhealth)

    Hi,
    Thank you. I found the issue is with the use of the 7G Firewall.
    I discovered that commenting out line 26 resolved the issue
    “RewriteCond %{QUERY_STRING} (s)?(ftp|http|inurl|php)(s)?(:(/|%2f|%u2215)(/|%2f|%u2215)) [NC,OR]”
    The firewall author states it is difficult to write an exclusion in the firewall for this referral as the URL it calls is complicated and most likely dynamic based upon the account being used.
    But at least I found the solution!

    Plugin Support Sanjeev Aryal

    (@sanzeeb3)

    Hi @dantianhealth,

    I’m glad you sorted it out and thanks for taking time to let us know.

    Have a good one!

    Thread Starter Jason Chong

    (@dantianhealth)

    I hope my solution helps someone else!

    I’m having the same fits.

    I click on the button to allow the plugin to send via Google, select the desired Google account, bypass security warning (app’s not verified but it’s mine so meh), then get to the Confirm your choices dialog (You already gave access to…Make sure you trust [website], etc) and when I click Allow, I get the 403/forbidden error.

    I’m a reseller/webmaster with the exact same setup running on near a dozen sites (multi-sites and regular setups) with no problem. The only difference with this one is that there’s a WP installation in the web root (plugin’s working fine) and the problematic site is in a sub-directory with its own WP installation. All the directory/file permissions are 755/644 and there’s nothing in any of the htaccess files except the default WordPress rules.

    Any ideas?

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @avwebworks,

    I just tested a Gmail mailer configuration on a WP site installed in a subdirectory and everything went smoothly.

    It looks like the redirect from Google back to your WP site is not allowed (403 -forbidden). Please contact your hosting company and ask them to investigate this for you, maybe it’s a firewall setup or a restricted rewrite rule in .htaccess, …

    Take care!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Gmail 403’ is closed to new replies.