Hi there @nickandyhead,
Thanks for reaching out! We’ll be happy to help you get this sorted out.
Usually, when we see the Gmail mailer repeatedly disconnecting from WP Mail SMTP, it means that your Google API app (OAuth screen section: https://a.supportally.com/HMVXQm) is in the “Test mode” and needs to be changed to “Production” to resolve this issue.
Can you please look into adjusting this setting in?Google’s API & Services?>?OAuth consent screen?>?Publishing status?area and see if it resolves this issue for you?
Other Causes for Gmail Disconnections
The OAuth token in Gmail will reset for any event breaking the connection, including but not limited to:
- Changing Google password
- Enabling or disabling 2FA
- Google account access reset
- Activation of Google advanced protection program
- Revocation of the app to profile
- App OAuth permission revoked by Google
- App moved from public mode to private/internal mode by Google (or by a user whose user domain is not in the allowed org domain zone)
- App verification failure on reaudit
- Suspension of Google account
- User requested linked account unlinking
- The user does not use the app for 6 months (automatically expires refresh token)
- The user adds/removes sensitive or needs review scopes to the app but does not complete the app review process
- If the user is at the maximum limit for OAuth tokens to a Google profile (50) or for the service (25 for example in analytics), activation of a new refresh key will also automatically revoke the earliest key
To resolve the issue, please head over to the?WP Mail SMTP > Settings?page, and click on the “Remove Connection” button. Then click on the “Allow plugin to send emails using your Google account” button to re-enable access.
Verified App
You also mentioned seeing a warning that said “This app is not trusted, Proceed? (Unsafe.)” The wording is a little different from what we’ve seen, but it sounds like the verification screen. This notice that you see is due to Google’s strict security settings. In this case, you can go ahead to click on Advanced Options > Go to [your site name] to proceed with the configuration (please see the screenshot?here: https://a.supportally.com/8yXSUv).
In case it helps, you can check more information about this error in our guide here: https://wpmailsmtp.com/docs/how-to-set-up-the-gmail-mailer-in-wp-mail-smtp/#verified.
I hope that helps! Have a great day!