awesomemotive / WP-Mail-SMTP

The most popular WordPress SMTP and PHP Mailer plugin. Trusted by over 3 million sites.
https://wordpress.org/plugins/wp-mail-smtp/
GNU General Public License v3.0
55 stars 35 forks source link

Wrong Redirect Link from Gmail Mailer Setup #89

Closed omarthegeek closed 3 years ago

omarthegeek commented 3 years ago

Expected Behavior

When trying to connect using Gmail Mailer, and visiting the Gmail permissions approval page, you are then redirected to the plugin page on the wordpress site where the connection is confirmed as "connected" next to the Authorization.

Current Behavior

The redirect URL that takes you back to the wordpress site from gmail is wrong.

Possible Solution

Change the redirect url, and changing "options-general.php" to "admin.php"

Current Link: https://www.website.com/wp-admin/options-general.php?page=wp-mail-smtp..... Correct Link: https://www.website.com/wp-admin/admin.php?page=wp-mail-smtp

Steps to Reproduce

  1. Setup Gmail Mailer
  2. Click Yellow Authorization Button
  3. Verify connection and provide permission on Gmail website
  4. Redirect back to Wordpress with failed load

Screenshots

capuderg commented 3 years ago

Hi @omarthegeek,

when you click the "Allow" button on the google oAuth end step, you should be taken to the WP Mail SMTP settings page: /wp-admin/admin.php?page=wp-mail-smtp&success=google_site_linked

We are using the "options-general.php" because of backward compatibility, but we catch this and then redirect to the plugin settings page before the page loads.

Is it possible, that some other plugin is causing issues and blocking this in plugin redirect?

Also, which PHP and WP versions are you using?

Take care!

slaFFik commented 3 years ago

I'm closing this issue due to no activity from the initial author.

@omarthegeek, feel free to reply here, and we will re-open the issue if anything is needed to be done from our side. Thanks for understanding!