Gmail SMTP Plugin for WordPress

Gmail SMTP is an advanced SMTP mailing plugin for WordPress for sending an email via Gmail SMTP server. Unlike most SMTP plugins It uses the OAuth 2.0 protocol to authorize access to the Gmail API instead of password authentication.

gmail smtp wordpress plugin

Gmail SMTP Benefits

1. Gmail SMTP plugin does not store your password. It uses the OAuth 2.0 mechanism for SMTP authentication. It means a more secure login system for users.

2. Gmail SMTP plugin uses PHPMailer – a very popular PHP library used in the core WordPress for sending an email. This is to make sure that users can still get full benefits of the default email functionality.

3. Gmail SMTP plugin takes a big headache away from you because you no longer need to Allow Less Secure Apps on your Gmail account. This is an option that users had to enable in order to fix SMTP connection issue. This issue went viral from December 2014, when Google started imposing OAuth 2.0 authentication to access their apps. This option affects SMTP mailing because applications that perform password authentication to IMAP, POP, or SMTP are considered Less Secure Apps.

As far as I know, this issue still affects almost all the SMTP plugins out there.

How OAuth 2.0 Authorization Works

1. You register a web application in the Google Developers Console.

2. When this application is launched it requests that you give it access to data in your Google account.

3. If you consent, the application receives credentials to access the API.

Installation

You can install the Gmail SMTP plugin in one of the following ways:

Option 1 (Quick & Easy install)

  1. Go to Plugins->Add New from your WordPress admin dashboard
  2. Search for “gmail smtp naa986”
  3. Click Install once you have found it

Option 2 (Manual install)

  1. Download the zip version of the plugin
  2. Go to Plugins->Add New
  3. Click Upload Plugin
  4. Select the zip file on your computer
  5. Install it

Gmail SMTP Configuration

In order to get started with the plugin go to Settings->Gmail SMTP from your admin dashboard.

screenshot of gmail smtp plugin menu

Gmail SMTP Project Creation

1. Go to console.cloud.google.com/apis/dashboard.

2. Login to your Google account which will be used to send an email.

3. Create a new project where your application will be registered.

screenshot showing how to create a new project in the Google Developers Console

It doesn’t have to be “Gmail SMTP Project 1”. You can name it whatever you like. I chose a meaningful name because I have multiple projects in it.

Credentials/App Creation

1. Once the project is created go to Credentials > CREATE CREDENTIALS and select OAuth client ID.

2. In order to create an OAuth client ID, you need to configure the OAuth consent screen first. So click CONFIGURE CONSENT SCREEN.

screenshot showing how to configure the consent screen when creating an OAuth Client ID

3. Choose how you want to configure and register your app. Since I’m not using G Suite I had to choose External.

screenshot showing how to choose a user type in the oauth consent screen of the google developers console

4. Enter a name (e.g. Gmail SMTP) for the OAuth consent screen.

screenshot showing the OAuth consent screen 2 in the google developers console

5. You can configure optional fields such as Authorized domains, Application home page, Application privacy policy link and Application terms of service link (I was able to skip all and click SAVE AND CONTINUE). You do however need to enter an email address under the Developer contact information section.

screenshot showing part 2 of the consent screen 2 in the google developers console

6. Skip the Scopes screen.

screenshot showing the Scopes tab in the OAuth consent screen of the Google cloud console

7. Add a test user if you plan to use this app in test mode (This is not required if you want to publish it).

screenshot showing the Test users tab in the OAuth consent screen of the Google cloud console

8. Keep your app in test mode or publish it. If the Publishing status is set to In production, a warning message (This app isn’t verified) may appear on the consent screen that you can easily skip.

screenshot showing the Summary tab in the OAuth consent screen of the Google cloud console

Now that the OAuth consent screen has been configured you can create an OAuth Client ID.

9. Go to the Credentials tab and select OAuth client ID under CREATE CREDENTIALS.

screenshot showing how to select OAuth client Id under CREATE CREDENTIALS in the google developers console

10. Set the application type to Web application and enter a name for it (e.g. Gmail SMTP App). Copy the Authorized Redirect URL from the settings and paste it into the field here.

screenshot showing how to create a client id by creating a new web app in the google developers console

11. Click Create. This will generate a Client ID and Client Secret for you. Copy and paste them into the settings area of the plugin.

Gmail SMTP Settings Configuration

1. Configure the rest of the settings. It includes,

OAuth Email Address: The email address that you will use for SMTP authentication. This should be the same email used in the Google Developers Console.

From Email Address: The email address which will be used as the From Address when sending an email.

From Name: The name which will be used as the From Name when sending an email.

Type of Encryption: The encryption which will be used when sending an email (either TLS/SSL). By default, it should be set to TLS since SSL has been deprecated since 1998.

SMTP Port: The port which will be used when sending an email. If you choose TLS it should be set to 587. For SSL use port 465 instead.

2. Click Save Changes.

Now that you have configured the settings a Grant Permission button will appear.

screenshot showing how to grant permission from the gmail smtp settings

3. Clicking on it will take you to a consent screen where you will be able to grant this app access to the Gmail API.

allow application screen of google developers console

4. When you click Allow you will get redirected back to the plugin settings. You should see a message like Access Granted Successfully. The SMTP Status should also get set from Not Connected to Connected.

screenshot of gmail smtp settings

That’s it. Gmail SMTP plugin will now be able to take control of all outgoing email from your website.

Test Email

In order to test the email functionality, you can send a test email from the Test Email tab.

Debug option is enabled by default for the test email functionality – which means you would be able to see if the plugin was able to send the email without any error.

screenshot showing how to send a test email from the gmail smtp plugin settings

Troubleshooting

By default, your SMTP port should be configured on 587 (with TLS encryption). If you can’t get it to work then you can try changing it to 465 (with SSL encryption).

If you still can’t get either to work try port 25 with TLS first and then SSL. Please note that most servers don’t support encryption on port 25, which is why port 587 and 465 are the preferred options.

Fresh Authorization / Removing Access From the Application

For some reason, if you ever want to stop using this plugin or do a fresh authorization this option might come in handy.

Revoke Access menu allows you to remove access from a previously authorized application.

screenshot showing the revoke access settings of gmail smtp plugin

First, you need to click on the account settings link. This will take you to a page where you can remove access from the Gmail SMTP application.

screenshot showing how to remove access from an application in the google developers console

Once you have removed access from it, go back to the Remove Access tab in the plugin settings and delete the Access key.

Access key is a token that the plugin received when you first granted your app access to the Gmail API. This token is necessary to communicate with the Gmail API and send an email. In order to avoid any confusion, the plugin does not show it on the settings page.

Once you delete this token the plugin can no longer connect to the Gmail SMTP server or send an email. This means you will need to reauthorize (using the web application link in the settings) before you can start using the plugin again. However, you won’t need to set up everything from scratch as long as the project still exists in your Google Developers Console.

Gmail SMTP Add-ons

Gmail SMTP plugin comes with add-ons that you can use to enhance its functionality on your website.

Reply-To

Reply-To add-on lets you set a reply-to address for all outgoing email messages.

Cc

Cc add-on lets you set a cc recipient for all outgoing email messages.

712 thoughts on “Gmail SMTP Plugin for WordPress”

  1. I am receiving a fatal error when the page refreshes after I click on the Grant Permission button.

    Fatal error: Call to undefined function GuzzleHttp\Handler\curl_reset() in /home3/passthebaton/public_html/wp-content/plugins/gmail-smtp/google-api-php-client/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 78

    I followed all the instructions and I also removed it and set up a fresh authorization and it is not working. Please let me know how I can fix this issue. Thanks.

    Reply
    • @Kevin, Please provide the content of the “Server Info” tab so I can check it.

      Reply
      • Hello,

        Actually, I was finally able to get the plugin activated, but when testing the email it gave me this error:

        2018-08-27 17:37:04 Connection: opening to smtp.gmail.com:587, timeout=300, options=array ()
        2018-08-27 17:37:04 Connection: opened
        2018-08-27 17:37:04 SMTP -> get_lines(): $data is “”
        2018-08-27 17:37:04 SMTP -> get_lines(): $str is “220 smtp.gmail.com ESMTP m4-v6sm6330214oic.34 – gsmtp”
        2018-08-27 17:37:04 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP m4-v6sm6330214oic.34 – gsmtp
        2018-08-27 17:37:04 CLIENT -> SERVER: EHLO passthebaton-payitforward.com
        2018-08-27 17:37:04 SMTP -> get_lines(): $data is “”
        2018-08-27 17:37:04 SMTP -> get_lines(): $str is “250-smtp.gmail.com at your service, [108.167.189.65]”
        2018-08-27 17:37:04 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [108.167.189.65]”
        2018-08-27 17:37:04 SMTP -> get_lines(): $str is “250-SIZE 35882577”
        2018-08-27 17:37:04 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [108.167.189.65]250-SIZE 35882577”
        2018-08-27 17:37:04 SMTP -> get_lines(): $str is “250-8BITMIME”
        2018-08-27 17:37:04 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [108.167.189.65]250-SIZE 35882577250-8BITMIME”
        2018-08-27 17:37:04 SMTP -> get_lines(): $str is “250-STARTTLS”
        2018-08-27 17:37:04 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [108.167.189.65]250-SIZE 35882577250-8BITMIME250-STARTTLS”
        2018-08-27 17:37:04 SMTP -> get_lines(): $str is “250-ENHANCEDSTATUSCODES”
        2018-08-27 17:37:04 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [108.167.189.65]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES”
        2018-08-27 17:37:04 SMTP -> get_lines(): $str is “250-PIPELINING”
        2018-08-27 17:37:04 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [108.167.189.65]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING”
        2018-08-27 17:37:04 SMTP -> get_lines(): $str is “250-CHUNKING”
        2018-08-27 17:37:04 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [108.167.189.65]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING”
        2018-08-27 17:37:04 SMTP -> get_lines(): $str is “250 SMTPUTF8”
        2018-08-27 17:37:04 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [108.167.189.65]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
        2018-08-27 17:37:04 CLIENT -> SERVER: STARTTLS
        2018-08-27 17:37:04 SMTP -> get_lines(): $data is “”
        2018-08-27 17:37:04 SMTP -> get_lines(): $str is “220 2.0.0 Ready to start TLS”
        2018-08-27 17:37:04 SERVER -> CLIENT: 220 2.0.0 Ready to start TLS
        2018-08-27 17:37:04 CLIENT -> SERVER: EHLO passthebaton-payitforward.com
        2018-08-27 17:37:04 SMTP -> get_lines(): $data is “”
        2018-08-27 17:37:04 SMTP -> get_lines(): $str is “250-smtp.gmail.com at your service, [108.167.189.65]”
        2018-08-27 17:37:04 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [108.167.189.65]”
        2018-08-27 17:37:04 SMTP -> get_lines(): $str is “250-SIZE 35882577”
        2018-08-27 17:37:04 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [108.167.189.65]250-SIZE 35882577”
        2018-08-27 17:37:04 SMTP -> get_lines(): $str is “250-8BITMIME”
        2018-08-27 17:37:04 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [108.167.189.65]250-SIZE 35882577250-8BITMIME”
        2018-08-27 17:37:04 SMTP -> get_lines(): $str is “250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH”
        2018-08-27 17:37:04 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [108.167.189.65]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH”
        2018-08-27 17:37:04 SMTP -> get_lines(): $str is “250-ENHANCEDSTATUSCODES”
        2018-08-27 17:37:04 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [108.167.189.65]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES”
        2018-08-27 17:37:04 SMTP -> get_lines(): $str is “250-PIPELINING”
        2018-08-27 17:37:04 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [108.167.189.65]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING”
        2018-08-27 17:37:04 SMTP -> get_lines(): $str is “250-CHUNKING”
        2018-08-27 17:37:04 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [108.167.189.65]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING”
        2018-08-27 17:37:04 SMTP -> get_lines(): $str is “250 SMTPUTF8”
        2018-08-27 17:37:04 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [108.167.189.65]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
        2018-08-27 17:37:04 Auth method requested: XOAUTH2
        2018-08-27 17:37:04 Auth methods available on the server: LOGIN,PLAIN,XOAUTH2,PLAIN-CLIENTTOKEN,OAUTHBEARER,XOAUTH
        2018-08-27 17:37:05 CLIENT -> SERVER: AUTH XOAUTH2 dXNlcj1tYWNoZWxsZWZvc3RlckBwYXNzdGhlYmF0b24tcGF5aXRmb3J3YXJkLmNvbQFhdXRoPUJlYXJlciABAQ==
        2018-08-27 17:37:05 SMTP -> get_lines(): $data is “”
        2018-08-27 17:37:05 SMTP -> get_lines(): $str is “334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ==”
        2018-08-27 17:37:05 SERVER -> CLIENT: 334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ==
        2018-08-27 17:37:05 SMTP ERROR: AUTH command failed: 334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ==
        SMTP Error: Could not authenticate.
        2018-08-27 17:37:05 CLIENT -> SERVER: QUIT
        2018-08-27 17:37:05 SMTP -> get_lines(): $data is “”
        2018-08-27 17:37:05 SMTP -> get_lines(): $str is “535-5.7.8 Username and Password not accepted. Learn more at”
        2018-08-27 17:37:05 SMTP -> get_lines(): $data is “535-5.7.8 Username and Password not accepted. Learn more at”
        2018-08-27 17:37:05 SMTP -> get_lines(): $str is “535 5.7.8 https://support.google.com/mail/?p=BadCredentials m4-v6sm6330214oic.34 – gsmtp”
        2018-08-27 17:37:05 SERVER -> CLIENT: 535-5.7.8 Username and Password not accepted. Learn more at535 5.7.8 https://support.google.com/mail/?p=BadCredentials m4-v6sm6330214oic.34 – gsmtp
        2018-08-27 17:37:05 SMTP ERROR: QUIT command failed: 535-5.7.8 Username and Password not accepted. Learn more at535 5.7.8 https://support.google.com/mail/?p=BadCredentials m4-v6sm6330214oic.34 – gsmtp
        2018-08-27 17:37:05 Connection: closed
        SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

        I looks like there is an error with the username and password, which doesn’t make sense to me if the plugin is connected using an API. Let me know if you have any ideas. Thanks.

        Reply
        • Just wanted to check with you to see if you had any solution to this error message I am getting. Thanks.

          Reply
        • Now I am getting this fatal error today.

          Fatal error: Uncaught exception ‘LogicException’ with message ‘refresh token must be passed in or set as part of setAccessToken’ in /home3/passthebaton/public_html/wp-content/plugins/gmail-smtp/google-api-php-client/src/Google/Client.php:267 Stack trace: #0 /home3/passthebaton/public_html/wp-content/plugins/gmail-smtp/google-api-php-client/src/Google/Client.php(255): Google_Client->fetchAccessTokenWithRefreshToken(NULL) #1 /home3/passthebaton/public_html/wp-content/plugins/gmail-smtp/class.phpmaileroauthgoogle.php(150): Google_Client->refreshToken(NULL) #2 /home3/passthebaton/public_html/wp-content/plugins/gmail-smtp/PHPMailer/class.smtp.php(475): GmailXOAuth2->getOauth64() #3 /home3/passthebaton/public_html/wp-content/plugins/gmail-smtp/class.phpmaileroauth.php(153): SMTP->authenticate(”, ”, ‘XOAUTH2’, ”, ”, Object(GmailXOAuth2)) #4 /home3/passthebaton/public_html/wp-content/plugins/gmail-smtp/PHPMailer/class.phpmailer.php(1542): PHPMailerOAuth->smtpConnect(Array) #5 /home3/passthebaton/public_html/wp-content/plugins in /home3/passthebaton/public_html/wp-content/plugins/gmail-smtp/google-api-php-client/src/Google/Client.php on line 267

          Reply
        • Getting the same:

          “CLIENT: 535-5.7.8 Username and Password not accepted.”

          Less secure turned off.
          No 2-step verify.
          Even tried with DisplayUnlockCaptcha.
          Revoked access, granted access again.
          Double-checked API infos, everything is correct.

          Still the same problem.

          What happened?

          Reply
  2. I got this error after clicking grant permission button
    error: redirect_uri_mismatch

    The redirect URI in the request, https://www.mimicdigitalmarketing.com/wp-admin/options-general.php?page=gmail-smtp-settings&action=oauth_grant, does not match the ones authorized for the OAuth client. To update the authorized redirect URIs, visit: https://console.developers.google.com/apis/credentials/oauthclient/658941705935-g5mu1pbph7vm3bufiqsenaue4jdorfiu.apps.googleusercontent.com?project=658941705935

    Learn more

    Request Details
    response_type=code
    access_type=offline
    client_id=658941705935-g5mu1pbph7vm3bufiqsenaue4jdorfiu.apps.googleusercontent.com
    redirect_uri=https://www.mimicdigitalmarketing.com/wp-admin/options-general.php?page=gmail-smtp-settings&action=oauth_grant
    state=
    scope=https://mail.google.com/
    approval_prompt=auto

    Reply
    • @crisdale, Have you specified an authorized redirect URL in your app?

      Reply
      • I specified an authorized redirect URL in my app and I’m still getting this error message. Please advise.

        Reply
        • same problem

          Reply
          • me too

          • So how did you manage it? Or is it still unsolved? (I’m stuck there since days!)

    • Same problem. Please someone help

      Reply
  3. please help me know.
    How many max emails can be sent through this plugin?

    Reply
    • @Hung, There is no restriction. It may depend on your web host.

      Reply
      • Thanks Admin!

        Reply
  4. I’m getting this error after sending test email..
    Illegal string offset ‘refresh_token’ in

    Reply
  5. Warning: Illegal string offset ‘refresh_token’ in /home/girlstir/public_html/petjunction411.com/wp-content/plugins/gmail-smtp/main.php on line 685
    2018-09-03 21:40:42 Connection: opening to smtp.gmail.com:587, timeout=300, options=array ()

    I keep getting this error. How do I fix it…

    Reply
    • @Shelly, Please do a fresh authorization and see how it goes.

      Reply
  6. Hello, I have problem with allow gmail smtp because after press the allow button I will get “HTTP ERROR 500”. __________________ is currently unable to handle this request.
    HTTP ERROR 500

    Please let me know what can be possible issues? I have checked everything as per my capacity.

    Note : web page is working fine.

    Reply
    • @Neeraj, This is an internal server error. Your web host should be able to tell you exactly why this error occurred.

      Reply
  7. 2018-09-10 04:59:49 Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array ()
    2018-09-10 04:59:51 Connection failed. Error #2: stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 (Connection refused) [/home/keithklee/public_html/wp-content/plugins/gmail-smtp/PHPMailer/class.smtp.php line 299]
    2018-09-10 04:59:51 SMTP ERROR: Failed to connect to server: Connection refused (111)
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

    Reply
  8. When I send a test email, the From field does not match what I entered in the setup.

    Reply
    • @David, Google doesn’t allow you to change it for security reasons.

      Reply
  9. Hi,
    I’ve gone through all the steps and when I click the Grant Permission button, choose my account and enter my password, I’m redirected to a blank screen. It never completes the redirect back to the plugin settings.

    Reply
    • @Sabrina, What happens if you are already logged in to that account?

      Reply
      • Ok, I solved the initial problem (PHP needed to be updated) so SMTP status is now connected. When I try to send a test email I end up with this

        2018-09-18 15:04:38 SERVER -> CLIENT: 535-5.7.8 Username and Password not accepted. Learn more at535 5.7.8 https://support.google.com/mail/?p=BadCredentials j78-v6sm5195444itj.44 – gsmtp
        2018-09-18 15:04:38 SMTP ERROR: QUIT command failed: 535-5.7.8 Username and Password not accepted. Learn more at535 5.7.8 https://support.google.com/mail/?p=BadCredentials j78-v6sm5195444itj.44 – gsmtp

        Thanks for your help.

        Reply
  10. Hi, I recently enabled the plugin and now it seems that I am not receiving emails to the gmail account- I can send. Thoughts?

    Reply
    • @Adam, Have you tried sending a test email?

      Reply
  11. Hi, I’ve used your plugin successfully in the past and it’s worked great; however, on a new installation I can’t get it to authenticate. Here’s the last of the debug output:

    Auth method requested: XOAUTH2
    Auth methods available on the server: LOGIN,PLAIN,XOAUTH2,PLAIN-CLIENTTOKEN,OAUTHBEARER,XOAUTH
    SMTP Error: Could not authenticate.
    CLIENT -> SERVER: QUIT
    SMTP -> get_lines(): $data is “”
    SMTP -> get_lines(): $str is “221 2.0.0 closing connection k9-v6sm7549464iop.1 – gsmtp”
    SERVER -> CLIENT: 221 2.0.0 closing connection k9-v6sm7549464iop.1 – gsmtp
    Connection: closed
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

    I followed your instructions and looked for an email about hacking but I did not have anything like that.

    Any other ideas regarding this?

    Thanks,

    Roger

    Reply
  12. I got error 403 after returning from Gmail with the access token. The link appears to be ok, but it can’t continue.

    Reply
  13. This was SO helpful and outlined every step, very easy to follow. Thank you for posting

    Reply
  14. I have used this plugin several times. This is the first time I’m running into this specific problem. I’ve run through many tests.

    I have setup the Google Gmail API, the Oauth, privacy page, added SSL, tested all port combos, allowed less secure apps, turned off catpcha (just in case), PHP is ok, and more…

    When I run a test I don’t get an error or report back. Instead it redirects to a 404 page error.

    I feel like it is being blocked by something as it seems to be simply timing out.

    Any suggestions are welcome!

    Thank you

    Reply
  15. I am unable to enter the Authorized Redirect URI. The error message is: “Invalid Redirect: domain must be added to the authorized domains list before submitting. “

    Reply
    • @Nicole, Are you using G Suite?

      Reply
      • Using regular free Gmail. I just Setup this plugin for another site last month and it worked.

        Reply
  16. I have gone through the steps to set everything up. When I try to send the test email, it times out and takes me to “An error occurred.” page. Not sure if the issue is with the plugin or gmail. Can you offer any recommendations?

    Reply
  17. Hi,

    I am unable to complete grand permission.
    After clicking “Allow” button from gmail, its redirecting and getting error page.

    https://prnt.sc/l5uaty
    error page URL

    Kindly support to solve the issue.

    with regards,
    M Jaseem M K

    Reply
  18. Hi,

    I followed the instructions to the letter and still my website cannot send emails out using the ‘Gmail SMTP” plugin. I have an email account with gmail and all relevant details have been generated to make the plugin configure properly.

    See the following screenshots:
    https://i.postimg.cc/6QG7FkpH/SMTP-plugin-configuration1.png
    https://i.postimg.cc/fLfbNDnv/SMTP-plugin-configuration2.png

    What is causing this and how can it be resolved?

    Regards,

    Yunis

    Reply
  19. Hi, tried for ages to get this to work but keep getting errors, can you help? 😉
    ————————————————
    400. That’s an error.

    Error: redirect_uri_mismatch

    The redirect URI in the request, http://www.lancastermusiccoop.co.uk/wp-admin/options-general.php?page=gmail-smtp-settings&action=oauth_grant, does not match the ones authorized for the OAuth client. To update the authorized redirect URIs, visit: https://console.developers.google.com/apis/credentials/oauthclient/993829017348-fu0tp2m03kpjafrf3enpnthh3gndvd10.apps.googleusercontent.com?project=993829017348

    Learn more

    Request Details

    response_type=code
    access_type=offline
    client_id=993829017348-fu0tp2m03kpjafrf3enpnthh3gndvd10.apps.googleusercontent.com
    redirect_uri=http://www.lancastermusiccoop.co.uk/wp-admin/options-general.php?page=gmail-smtp-settings&action=oauth_grant
    state=
    scope=https://mail.google.com/
    approval_prompt=auto

    That’s all we know.
    ————————————————-
    It does say Copy the URL into your web application: http://www.lancastermusiccoop.co.uk/wp-admin/options-general.php?page=gmail-smtp-settings&action=oauth_grant

    This file exists but do I have to copy something into the file options-general.php code?

    Cheers in advance

    Reply
    • Same problem!!!
      Please someone help!

      Reply
  20. Please help. After doing everything shown in the instructions, I’m getting the error below:

    I don’t know how to fix it. Can anyone help me with that please?

    Reply

Leave a Comment