• 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 - 16 through 30 (of 31 total)
  • Plugin Author Gregor Capuder

    (@capuderg)

    For anyone else with this error, please create a new support post here and provide as much information as possible.

    Thank you!

    * I deleted the connection when I received this 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 …

    * To reconnect and fix this error.

    * But unfortunately I want to connect, the verification process is done by Google when I return to the site with the message:

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

    Thread Starter Sean

    (@sean-h)

    I’m posting in here again because @mdricketts mentioned a failsafe if the regular emails can’t get sent. Could the plugin not somehow default to the internal php mailer to send out a warning if it has failed? I know, php mailer is notoriously unreliable, which is why we need smtp, but right now it seems the tables have turned.

    I generally rely on emails sent by the likes of Wordfence to tell me if something is wrong or needs updating, I don’t log into WP everyday to check each site, and I only have 6 sites, so I can see how this is a problem for agencies with 50+ sites.

    As it is right now, the only way to know if your smtp plugin has stopped working is to log into WP and you should see a warning in your main dashboard like I did, but my missus actually saw it first in her website and had zero idea what it meant, or you wonder why you haven’t gotten any emails for weeks, but by then untold damage could have already been done. My site could have got infected and Wordfence wasn’t able to tell me.

    I just checked again, and my setups still seem to be working, but I have to wonder if I can continue to rely on this plugin?

    • This reply was modified 4 years, 4 months ago by Sean. Reason: Grammar
    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @2mihan,

    could you please try to follow the Gmail mailer instructions again, from the start (creating a new Google app, changing the Client ID and secret plugin settings…): https://wpmailsmtp.com/docs/how-to-set-up-the-gmail-mailer-in-wp-mail-smtp/

    Let me know how it goes.

    @sean-h as you said, the default PHP mailer is very unreliable, so trying to send an email that would probably not be delivered is not a very good way for letting users know something went wrong… We would need to use some other method of communication to deliver that message. Maybe some other app integrations? Maybe Slack? Or some other messaging platform… I’ll note this idea of “user notification in case of email sending error” in our features list.

    Take care!

    Hello @capuderg,

    Yes, removing and then reestablishing the connection seems to do the trick. I’m more concerned about what caused it in the first place and how it can be avoided in the future. If this is going to happen again I’ll want to look for a solution elsewhere sooner rather than later, it’s a lot of work to go through and fix 40 sites.

    As a fail safe I was thinking that if the plugin errors it could fall back to the default method of delivering email, before the plugin was ever installed.

    Thank you!
    Matt

    Replicated the issue on an another website.

    Running previous version 2.1.1 that was still working.

    Updated to 2.2.1 and authentication immediately broke (got the same error).

    1. I took screen shots of the steps to get it working again.
    2. Remove Connection
    3. Allow Plugin to send emails using your Gmail Account
    4. Grant permission to read, compose, send and delete all of your email from Gmail – Allow
    5. Confirm your choices – Allow
    6. You have successfully linked the current site with your Google API project.
    7. Test HTML email was sent successfully!
    • This reply was modified 4 years, 4 months ago by wwwXpert.
    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @mdricketts,

    thank you for confirming the re-connection worked for you. We can’t predict when Google might revoke oAuth connection. This happened to a handful of people, but the majority was unaffected. I can not reproduce it. I tried with G-suite and Gmail accounts, with plugin updates and, so on… No luck to get this error.

    @wwwxpert thank you for providing the screenshots and the steps to resolve this issue. When I go through the Google auth process, my step no.4 is choosing the account and I don’t get this little popup “Grant [Email address] permission”. After I select the Gmail account I get redirected to step no.5 and click “Allow”.

    Don’t know why there is an extra step for the little popop for you.

    Take care!

    Same issue here. I have logged into at least a dozen client sites and ALL of them are having the same issue. I have to do a reconnection on everyone. Of course, this is a real PIA. How can we be assured it won’t pop up again. I’m not in these sites every single day so it could be a while before it gets noticed if it does. ??

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @printergirl,

    Are all of your clients using free Gmail accounts to connect? (not G-suite)

    As said in previous messages in this thread, we don’t (can’t) know why/when Google would reset the oAuth connections for some users.

    As for notifying you if the emails fail to be sent, we’ve logged this feature request and will consider it for our future updates.

    Take care!

    So if I’m running 50+ sites then I have to remove connection and re enable it? Nice solution.

    i’m not using any google service
    still got this error
    when try to access WP SMPT page, got error: The link you followed has expired.

    I am having this exact same problem since the update and cannot figure out how to resolve it.

    This is the error I am receiving:

    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”: “Bad Request”
    }
    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.

    There is no “Remove Connection” button in the FREE version. What do I do?

    This had been working flawlessly and now it doesn’t. It also states that downgrading may cause problems with the site.

    • This reply was modified 4 years, 3 months ago by ddb6081.
    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @ddb6081,

    when you visit our plugin settings page… There is no “Remove connection” button in the Gmail mailer settings section? (step 2. posted above: https://www.ads-software.com/support/topic/email-delivery-error-20/page/2/#post-13136898)

    That’s really strange. Could you please share a screenshot of your settings page with the sensitive data blurred out (client ID, from email, …)?

    Take care!

    Hi, thank you for your reply. I ended up re-installing WP Mail SMTP and redoing the Google API. Now I’m getting a totally different error, but I still do not have the “Remove Connection” button and to be honest do not recall ever seeing that. Here are the various screen shots for WP Mail SMTP free version I have which is Version 2.2.1 By WPForms.

    OK, how the heck do I upload images???

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