• Resolved sm5987

    (@sm5987)


    Hello,

    I am not a professional web developer by any means so I’d really appreciate any help (and preferably simplified!) you can give.

    My organization’s website utilizes contact forms, and after years of working here I just now realized that all of the contact form emails have not been going through. We have Post SMTP downloaded on WordPress, and the plugin says it’s configured, but when I try to send a test email this message comes up:

    { “error”: { “code”: 401, “message”: “Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.”, “errors”: [ { “message”: “Login Required.”, “domain”: “global”, “reason”: “required”, “location”: “Authorization”, “locationType”: “header” } ], “status”: “UNAUTHENTICATED”, “details”: [ { “@type”: “type.googleapis.com/google.rpc.ErrorInfo”, “reason”: “CREDENTIALS_MISSING”, “domain”: “googleapis.com”, “metadata”: { “method”: “caribou.api.proto.MailboxService.SendMessage”, “service”: “gmail.googleapis.com” } } ] } }

    Likewise, when I go into the email log to view the old log, all of the emails show the status as “Bad Request(invalid_grant)”. All of them, going back two years.

    I have tried relaunching the wizard: I choose Google API since we use Gmail. All the other info (the from email, client ID) looks good, but I don’t know for sure since I’m not a developer, nor do I know who originally built the site or downloaded this plugin. Regardless, when I click “Connect to Gmail API” I get this screen (see screenshot).

    The plugin also says it needs to migrate to new logs; I have done that more than once, and nothing changes; in the new logs, I see no new emails from any date.

    I’ve also tried deactivating the plugin and reactivating, but I get the same message when I get to the authentication part.

    Thoughts?

    Thanks everyone.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support M Aqib Khan

    (@aqibkhan9)

    Hello @sm5987 ,

    We hope this message finds you well.

    Thank you for reaching out to our Support team. We are truly sorry to hear about the issue you are experiencing.

    It appears that your Gmail API credentials may have expired, or perhaps you recently updated the password for your Google account. To resolve this, kindly generate a new Client ID and Client Secret and reconfigure the settings. You can refer to our documentation for step-by-step guidance.

    For the logs issue, kindly share your Diagnostic test report along with the screenshot of the email logs page & the error message.

    If you encounter any difficulties during the process or need further assistance, please don’t hesitate to reach out to us. We’re here to help!

    Best regards,
    Support Team – WP Experts

    Thread Starter sm5987

    (@sm5987)

    Hello,

    Thank you so much. I will try using your instructions to create a new ID and Client Secret.

    Is the diagnostic test report something I should have access to through my host, or WordPress? Or somewehre else? (Again, I’m not a developer!)

    Thank you!

    Thread Starter sm5987

    (@sm5987)

    I am trying to go through the steps to regenerate an ID and Client Secret, but when I try to go to Google Cloud Console to set up Google API, it says I’m not allowed by my administrator. 🙁 I don’t even know who my administrator is! I will find that out and hopefully get access. Appreciate your patience.

    (We don’t want to pay for SMTP Pro unless we absolutely have to. Is that recommended? A one-click setup sure sounds easier than doing it manually.)

    Plugin Support M Aqib Khan

    (@aqibkhan9)

    Hey @sm5987

    You can easily fetch the Diagnostic Test Report directly from the plugin. Simply navigate to the Post SMTP Dashboard, and on the right-hand side under the Troubleshooting section, you’ll find the option to generate the report.

    Regarding the Client ID and Secret, please ensure that you’re consistently using the same Gmail account throughout the entire setup process. This is crucial to avoid any authentication issues.

    As a side note, the Gmail One Click configuration is just a helpful recommendation based on your situation, it simplifies the setup significantly by eliminating the need for manual API configurations. However, the choice is entirely yours, and we’re here to support whichever route you decide to take.

    I’m committed to getting this resolved for you as swiftly and smoothly as possible. Please don’t hesitate to reach out with any further questions or updates.

    Warm regards,
    Support Team – WP Experts

    Thread Starter sm5987

    (@sm5987)

    Hello,

    Thank you. Here is the diagnostic test, with screenshots below:

    Mailer: postsmtp
    HostName: stmarkslutheran.com
    cURL Version: 7.61.1
    OpenSSL Version: OpenSSL/1.1.1k
    OS: Linux biz252.inmotionhosting.com 4.18.0-553.47.1.lve.el8.x86_64 #1 SMP Tue Apr 8 13:54:31 UTC 2025 x86_64
    PHP: Linux 7.4.33 C
    PHP Dependencies: iconv=Yes, spl_autoload=Yes, openssl=Yes, sockets=Yes, allow_url_fopen=Yes, mcrypt=No, zlib_encode=Yes
    WordPress: 5.9.3 en_US UTF-8
    WordPress Theme: Enfold Child
    WordPress Plugins: Post SMTP, Akismet Anti-spam: Spam Protection, Classic Editor, Optimus, SVG Support, UpdraftPlus – Backup/Restore, Yoast SEO, WP Downgrade | Specific Core Version, WP Fastest Cache
    WordPress wp_mail Owner: /home/stmark17/public_html/wp-content/plugins/post-smtp/Postman/PostmanWpMailBinder.php
    WordPress wp_mail Filter(s): wp_staticize_emoji_for_email, PostsmtpMailer->get_mail_args
    Postman: 3.2.0
    Postman Sender Domain (Envelope|Message): stmarkslutheran.com | stmarkslutheran.com
    Postman Prevent Message Sender Override (Email|Name): No | No
    Postman Active Transport: Gmail API (https:login://www.googleapis.com:443)
    Postman Active Transport Status (Ready|Connected): Yes | Yes
    Postman Deliveries (Success|Fail): 2144 | 5570

    Error message

    Email log new

    Email log old 1

    Email log old 2

    Please note that the only reason two different emails show on the log is because I was trying to see if I could get messages to go through to a different email. Messages don’t go through to the original email or the other one.

    • This reply was modified 1 year ago by sm5987.
    • This reply was modified 1 year ago by sm5987.
    Thread Starter sm5987

    (@sm5987)

    Also–do I absolutely need to use one email? I ask because I am the website administrator for this company, but someone else runs our Gmail accounts. So we’re using two different emails, one for Google Cloud Console, and mine for WP. It would be a real pain to have to create a new email account just to get this set up.

    Thank you so much.

    Thread Starter sm5987

    (@sm5987)

    Hello,

    The contact forms now work! Thank you so much. That was the main issue. 🙂

    However, I notice the email log still is not updating. I’m looking at the new one (post migration). Our old one has all the old logs, but none of the new test emails that I sent through yesterday or this morning. The log still shows just like it did in the “Email Log New” screenshot I sent you.

    Is there something I need to do to activate the email log or otherwise get them to show up?

    Thank you!

    Thread Starter sm5987

    (@sm5987)

    One more question: I notice we have gotten a few “spam” results from the forms–people filling out forms with random information and it gets through to the recipient email–is there any way to prevent this? The people are filling out the forms “correctly” so I’m really not sure if anything can be done. There aren’t many though

    Thank you.

    Plugin Support M Aqib Khan

    (@aqibkhan9)

    Hey @sm5987 ,

    I’m glad to hear that your emails are working now!

    Regarding the email logs issue, it appears to be related to an outdated PHP version. Updating PHP to the latest supported version should help resolve this.

    As for spam protection, I recommend implementing one or more of the following:

    • reCAPTCHA
    • Multi-step forms
    • Honeypot techniques

    These methods are effective in preventing spam submissions and improving overall form security.

    Warm regards,
    Support Team – WP Experts

    Thread Starter sm5987

    (@sm5987)

    Thank you so much! We are working on upgrading our PHP, so I’m glad to hear that will help.

    I will definitely look into those anti-spam options. Thanks you so much again for your time and help.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Post SMTP Authentication’ is closed to new replies.