• Resolved Sean

    (@sean-h)


    This plugin has been working fine since I installed it on all my sites a few months ago, until this last update. Now I get the following error:

    EMAIL DELIVERY ERROR: the plugin WP Mail SMTP v2.2.1 logged this error during the last time it tried to send an email:

    Mailer: Gmail
    {
    “error”: “invalid_grant”,
    “error_description”: “Token has been expired or revoked.”
    }
    Please re-grant Google app permissions!
    Go to WP Mail SMTP plugin settings page. Click the “Remove Connection” button.
    Then click the “Allow plugin to send emails using your Google account” button and re-enable access.

    So I reconnect, it works for a bit, then it stops again with this error.

Viewing 15 replies - 1 through 15 (of 31 total)
  • @sean-h I am facing the same issue since this morning.

    And trying to reconnect exactly throws this error

    There was an error while processing the authentication request. Please try again.

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @sean-h,

    we didn’t change any Gmail sending functionality with the last plugin update, except the support for Gmail/G-suite aliases (allowing the user to select the “From Email” in a dropdown menu).

    Could you please try to downgrade out plugin to v2.1.1. You can find the version at the bottom of this page: https://www.ads-software.com/plugins/wp-mail-smtp/advanced/

    Once you downgrade, please monitor your WP side and let me know if this error comes back.

    This would allow us to know if the issue is indeed with the latest plugin version.

    I’ve tested the Gmail connections with two different Google accounts (one Gmail and one G-suite) and they both work OK, so it’s really hard to say what is causing this issue on your WP site or Gmail account.

    How long does it work for you, when you reconnect the Gmail connection? Could you please also log into the Google API console and check if the app exists and you are entering valid Client ID and secret.

    If possible, also try to set up the Gmail mailer with another Gmail account (if at your disposal).

    Are you using this Gmail account for multiple sites? Or in other apps that require Gmail API authorization? There is a limit to how many active connections you can have on a single Google account.

    We would really like to improve our plugin if the issue is on our end and not on Gmail API.

    The more information you can provide the better.

    Take care!

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @onlinerockers,

    are you also using the Gmail mailer?

    Where exactly do you see the error you provided? In our plugin admin notice or on a google page when you try to authorize the Gmail mailer by clicking on the “Allow plugin to send emails using your Google account” button?

    Take care!

    Thread Starter Sean

    (@sean-h)

    Hi @capuderg

    I didn’t realise the email alias thing was something new.

    Up until now, I have been using the same Gmail address that I use for WP admin of all my sites to sync with the smtp plugin. So emails are sent from my gmail address back to the same address. This does make it a bit difficult to see which site is emailing me, but I did get used to it, sort of. When I discovered aliases, I then created a new email account at each domain (admin@domain) and added those as aliases to my gmail account and selected each one from the drop down for the appropriate website, and tests were sent and received as desired. I can now see much easier which website has just emailed me. So thanks for that very useful feature.

    Now as far as the error goes, I don’t think I will downgrade just yet, because further test emails just sent are successful. I also see no API errors whatsoever in my Google account.

    So I think I’m going to leave it all alone, because one of my favourite mantra’s is: If it ain’t broke, don’t fix it! But if it does break again without me touching it, then we can take it from there.

    Thanks again for your help! ??

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi Sean,

    OK ??

    Let us know if the issue comes back.

    I’m curious how many sites do you use this same Google account to authenticate with?

    Google has API limits for the number of active refresh tokens (oAuth2 connections). So if you are using your Google account on 25+ sites and apps (not just our plugin) to authorize with, that might be the cause of your issues. If the 26th app/site requires a new refresh token, the 1st app/site will have its refresh token revoked.

    I’m not 100% that the limit for Google API is 25 active oAuth2 connections, but that’s how it supposedly works.

    Have a nice day!

    PS: I’ll mark this thread as resolved.

    Thread Starter Sean

    (@sean-h)

    I only have 6 fairly quiet websites, and only this smtp connection, so no issue there then ??

    Thanks again and have a nice day too!

    I just started getting this error too.

    WP SMTP Mail has been running without issue since May 2019.

    I’ve been consistently upgrading and applying all security patches.

    I updated to Version: 2.2.1 which is when this problem arose.

    No changes or additions to the existing API have occurred.

    Same ID and Secret.

    Authorized domains have not changed.

    Quotas are way below the Limits.

    Queries per minute
    7 Day Peak Usage: 205
    Limit: 1,200,000

    Queries per day
    7 Day Peak Usage: 2,963
    Limit: 1,000,000,000

    • This reply was modified 4 years, 4 months ago by wwwXpert.

    Downgraded to 2.1.1 and it’s working again.

    Upgraded again to 2.2.1 to reproduce the error.
    Surprisingly it’s still working.

    For anyone else experiencing this, I did the following:
    Login to Google with the Google Account you used to create the Google API.

    Go to the plugin settings and click “Remove Connection”
    Reconnect and Approve.

    If it still doesn’t work, rename the plugin folder to wp-mail-smtp-2.2.1, install the prev ver 2.1.1 and test.

    If it works.

    Upgrade again to the latest version 2.2.1.

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @wwwxpert,

    Thank you very much for troubleshooting this issue and trying to find what is causing it.

    Did the problem come back on your site with v2.2.1?

    I’ve tested the Gmail mailer with a new installation of v2.2.1 and the connection with Gmail was working just OK. Also, the update from v2.1.1 to v2.2.1 with the existing Gmail connection worked OK. So I don’t know how I could reproduce this issue. I tested with a Gmail account and with a G-suite account…

    Could you please also check the server’s system time and date? Is it accurate? Having the system time off by a few minutes could cause the issue as well.

    Did you maybe change your Google account password in recent days?

    Did you maybe revoke the access for the app that you created for the plugin? On this page: https://security.google.com/settings/security/permissions

    Probably the answer is “no”, but I just want to check all the boxes of items that are known to cause this issue.

    Take care!

    hi

    This has happened to me since yesterday

    EMAIL DELIVERY ERROR: the plugin WP Mail SMTP v2.2.1 logged this error during the last time it tried to send an email:

    Mailer: Gmail …

    I did not change anything

    It no longer even verifies authentication

    thanks

    Thread Starter Sean

    (@sean-h)

    I could mark this back to unresolved, but it my case it is resolved, by simply disconnecting and reconnecting. 2 days later and it still seems ok.

    With that said, it might be best if we don’t post further problems in a topic that’s been marked ‘Resolved’, because each persons setup/site/server configs are slightly different, and I’m still subscribed to the email notice and it keeps pinging me every time someone replies. Maybe I will unsubscribe, then again, I am still curious as to what is going on.

    • This reply was modified 4 years, 4 months ago by Sean. Reason: Grammar, mistake made because Mozart was too loud

    I hate to pile on but this same exact issue has hit us pretty hard. If the plugin author would prefer I open a new ticket I will do so, just let me know.

    I’m only half way through auditing all of our sites and so far I’ve found 20 websites that are experiencing this same issue. Same error message as Sean.

    It all happened this week, probably on Monday.

    It came to my attention through a friend who manages a few client sites. On Monday he noticed that all of his sites had this error and were no longer sending out emails. So I decided to check all of the sites we manage and we’re at 20 with the same issue so far.

    We use a different Gmail address for every website we manage.

    It looks like the sites that use G-Suite addresses are unaffected, seems to be all the sites that use free gmail accounts that are experiencing this.

    Is it possible to build in some sort of fail safe that sends an email to the admin when errors like this prevent notifications from being sent?

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi Matt,

    I’m really sorry that you are experiencing this issue.

    Thank you for the info that only free Gmail accounts are affected.

    Were you able to resolve your issue by removing the connection and re-connecting in the plugin settings?

    We can’t send an email from your site to notify you of email delivery errors if they fail to send from your site (they would not be delivered).

    Take care!

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @2mihan,

    It no longer even verifies authentication

    Do you mean you can’t perform the “remove connection” and then reconnect in our plugin settings?

    What kind of error do you get when you try that?

    Take care!

Viewing 15 replies - 1 through 15 (of 31 total)
  • The topic ‘Email delivery error’ is closed to new replies.