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. Thanks… But Doug Leslie solved it by changing the MX setting from local to remote.

    Above, he says “All I had to do was log into my BlueHost account and change the MX record from ‘local’ to ‘Remote’. Just tested it and everything works.”

    I have also changed my MX from local to remote. The test email still doesn’t work for me. I also changed the host record to point to smtp.gmail.com. That also didn’t work.

    Finally, I called Bluehost. They say I can’t use gmail (or any remote email) with forms on my WordPress site.

    I’m not sure how it can work for Doug’s Bluehost account but not for mine. Perhaps he has Google Apps installed on Bluehost? That might be the secret.

    If you just want to use your regular gmail account (without Google Apps, which costs money), Bluehost doesn’t allow it. :^(

    Reply
    • @jim, That might be it because he also mentioned

      I called Blue Host prior to contacting you and they said since my MX records point to Gmail that there is nothing they can do

      Reply
  2. Hi there,
    I’ve used your plugin with great success on a few sites with a Google Apps mail account – thanks for the plugin.
    Whenever I try to use a regular non-Google Apps Gmail account, I get the following error. I’ve tried using both TLS and SSL but nothing works. Here’s the output I get from the test email page:

    Thanks for any help you may be able to provide.

    Cheers
    Wayne

    Reply
    • @Wayne, Who is your hosting provider? Please copy and paste the content of the “Server Info” tab so I can take a look.

      What other port combinations did you try?

      Reply
      • Hi there,
        Sorry for the delay. I’m with Cloudways/DigitalOcean. I’ve been very busy so I decided to just use a alternative plugin which is working fine (PM).
        To help you sort it out though, I can say that I used both the SSL and TLS configurations with their recommended ports (forget which is which now). I did try it three different times thinking that I must have made a typo or error while creating the API but it just would not work.
        Sorry I can’t help more.
        Thanks
        Wayne

        Reply
  3. I went through the whole process and my SMTP Status is green. However, when I try to send a test email I receive a 405 Error message (after 3 to 4 minutes of buffering that freezes up my WP dashboard). I have tried every port configuration.

    I have confirmed MX records with my host.

    Here is my settings info:
    OS: Linux box1112.bluehost.com 3.12.52-20160119.106.ELK6.x86_64 #1 SMP Tue Jan 19 16:53:32 CST 2016 x86_64
    PHP version: 5.6.17
    WordPress version: 4.5
    WordPress multisite: No
    openssl: Available
    allow_url_fopen: Enabled
    stream_socket_client: Available
    fsockopen: Available

    I have no idea what to do at this point.

    Reply
    • @Shellie, Is your mx record set to remote?

      Reply
  4. I’ve been trying to use the Gmail SMTP plugin. The MX record is set to remote in the cPanel. Trying to use an @gmail.com account.

    OS: Linux a2plcpnl0560.prod.iad2.secureserver.net 2.6.32-604.30.3.lve1.3.63.el6.x86_64 #1 SMP Sun Sep 27 06:34:10 EDT 2015 x86_64
    PHP version: 5.4.45
    WordPress version: 4.4.2
    WordPress multisite: Yes
    openssl: Available
    allow_url_fopen: Enabled
    stream_socket_client: Available
    fsockopen: Available

    Reply
    • @cory, Who is your hosting provider? What port combinations did you try?

      Reply
  5. Hi,

    I love the concept in this plugin, but can’t get it to work. I’m using a Google Compute VM. I am able to get another plugin to work that just authenticates with account/password, but not this plugin. Also, I’m a Google Apps user and this is a multi-site install. Not sure if that makes a difference. The setup shows fine, but no mail send and no activity on the API console. Below is the log from the send mail test. Any help is appreciated. Again, love the concept if I can get it to work.

    Reply
    • @Hugh, Do you still have any other Mail/SMTP plugin activated? Please make sure that you only have the Gmail SMTP plugin activated.

      Reply
      • Hi, there are no other mail plugins active. I just attempted using my Gmail account–getting Google Apps out of the picture and still no go. It must have something to do with Compute Engine or the server set up or both. It’s a virgin install if Ubuntu 14.04. Will play with it some more tomorrow.

        Reply
      • Hey, I picked up where I left off yesterday. No go with a clean slate. Is there anything on the PHP/Apache side that I should try? Below is the server info. There has to be something about the way Google Compute Engine interacts with Google APIs. Or maybe just something simple with the server setup. This is a new server and I think I installed everything component/library wise.

        BTW, Google Developers is offering a $300/two-month trial right now, so it’s the perfect time to test things on Google cloud services. I’ll be happy to continue troubleshooting, but I can’t think of anything else to try.

        Thanks for your help. Email or post if you have any ideas.

        -Hugh

        OS: Linux truuserver02 3.19.0-58-generic #64~14.04.1-Ubuntu SMP Fri Mar 18 19:05:43 UTC 2016 x86_64
        PHP version: 5.5.9-1ubuntu4.16
        WordPress version: 4.5
        WordPress multisite: Yes
        openssl: Available
        allow_url_fopen: Enabled
        stream_socket_client: Available
        fsockopen: Available

        Reply
  6. Hi
    I am using plugin with WP Better Emails plugin. The plugin has a nice visual editor and I have setup complete html with images but I am getting plain text email. The smtp plugin is removing all html tags and only sending plain text content. The email header has Content-Type: text/html.

    Reply
  7. Update – It looks like the WP Better Email plugin does not work properly with GMail SMTP plugin. Deactivating the plugin restores HTML emails.

    Reply
  8. When I run the test email I get the following message: 405 Not Allowed nginx/1.10.0

    Reply
  9. I did turn my GX settings to remote and Host Monster is who I use.

    Reply
  10. Fatal error: Uncaught exception ‘Google_IO_Exception’ with message ‘Failed to connect to accounts.google.com port 443:

    Reply
  11. Hi,
    I’ve followed all the intructions and I’m getting the following error bellow. Any ideas? Tried every combinations of ports and encriptions with no success.

    Thanks

    SERVER -> CLIENT: 220 2.0.0 Ready to start TLS

    Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /home/storage/9/08/35/agenciagdm/public_html/wp-content/plugins/gmail-smtp/PHPMailer/class.smtp.php on line 343
    SMTP Error: Could not connect to SMTP host.
    CLIENT -> SERVER: QUIT
    SMTP -> get_lines(): $data is ""
    Connection: closed
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

    Reply
    • @Ricardo, It looks like there is an issue in your SSL configuration.

      https://github.com/PHPMailer/PHPMailer/issues/368

      I can add a tweak in the plugin so it doesn’t verify the certificate. But I think you should try to get your hosting to fix the certificate (PHP 5.6 made this change for a good reason).

      Reply
      • I have released an update to address this issue. You can now disable SSL certificate verification in the settings, If you are unable to get your host to fix SSL configuration on the server.

        Reply
  12. Hi, i’ve followed all the instructions and have this error

    SMTP Error: Could not authenticate.
    CLIENT -> SERVER: QUIT
    SMTP -> get_lines(): $data is ""
    SMTP -> get_lines(): $str is "221 host.t2tagency.com closing connection"
    SERVER -> CLIENT: 221 host.t2tagency.com closing connection
    Connection: closed
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

    It’s a problem with the server?

    Reply
    • @Vinicius, Please check the “smtp connect() failed” section under “Troubleshooting”

      Reply
      • Same error as above:

        SMTP Error: Could not authenticate.

        No email in the auth email inbox. Tried revoking and deleting the auth. No luck.

        Please advice

        Reply
        • @Elliotr, Please contact your host to make sure port 587 is open and supports TLS encryption. Please also copy and paste content from the “Server Info” tab so I can take a look.

          Reply
  13. Really great plugin! I already have it running on a couple of client sites.

    Im encountering one annoying thing though – I can’t seem to change the “From Email Address” – everytime I receive an email the from email is always the defined “OAuth Email Address”.
    It seems that the defined “From Email Address” is ignored.

    Note: The email I have defined in “From Email Address” is a custom@clientdomain.com = not a gmail/google domain, not sure if that has anything to say?

    When sending the test email I see the correct “From Email Address”, however when I receive the email and reply to it, then it shows the “OAuth Email Address”.

    Anyone experienced the same issue?

    TEST EMAIL SNIPPET:
    CLIENT -> SERVER: Date: Wed, 11 May 2016 22:08:31 +0000
    CLIENT -> SERVER: To: my@email.com
    CLIENT -> SERVER: From: Company
    CLIENT -> SERVER: Subject: Test mail

    Reply
    • ok the EMAIL SNIPPET didn’t print out well in the comment 🙂 Eitherways, bottomline is that I see the right “From Email Address” in the test email log

      Reply
    • There is a solution. You must go to your account settings in gmail> accounts and import> Send email as:> Add another email address

      Follow the procedures to add custom@clientdomain.com

      Once added, will work custom@clientdomain.com defined in “From Email Address” in the plugin’s settings.

      Reply
  14. Hi,

    I am facing an unusual problem in that the configuration seems fine and the test email response doesn’t mention any errors, but none of the test emails are actually reaching their destinations. Here are some more details about my setup:

    Google: Using Google Apps for Business. Have set up OAuth as suggested and the Gmail SMTP settings shows a green checkmark.

    Domain: Domain is on Godaddy. MX records were set by Google Apps for Business automatically when I had signed up with them for email. I am unable to find any settings on Godaddy where I can change MX settings to “remote”, so that is one of the few steps from previous comments that I could not properly follow.

    Hosting: Hosting is on Digital Ocean.

    On trying to send Test Email, this is what I get:

    Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array ()
    Connection: opened
    SMTP -> get_lines(): $data is ""
    SMTP -> get_lines(): $str is "220 smtp.gmail.com ESMTP q19sm6609949qhb.20 - gsmtp"
    SERVER -> CLIENT: 220 smtp.gmail.com ESMTP q19sm6609949qhb.20 - gsmtp
    CLIENT -> SERVER: EHLO allonzy.in
    SMTP -> get_lines(): $data is ""
    SMTP -> get_lines(): $str is "250-smtp.gmail.com at your service, [162.243.2.17]"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [162.243.2.17]"
    SMTP -> get_lines(): $str is "250-SIZE 35882577"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [162.243.2.17]250-SIZE 35882577"
    SMTP -> get_lines(): $str is "250-8BITMIME"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [162.243.2.17]250-SIZE 35882577250-8BITMIME"
    SMTP -> get_lines(): $str is "250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [162.243.2.17]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH"
    SMTP -> get_lines(): $str is "250-ENHANCEDSTATUSCODES"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [162.243.2.17]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES"
    SMTP -> get_lines(): $str is "250-PIPELINING"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [162.243.2.17]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING"
    SMTP -> get_lines(): $str is "250-CHUNKING"
    SMTP -> get_lines(): $data is "250-smtp.gmail.com at your service, [162.243.2.17]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING"
    SMTP -> get_lines(): $str is "250 SMTPUTF8"
    SERVER -> CLIENT: 250-smtp.gmail.com at your service, [162.243.2.17]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
    Auth method requested: XOAUTH2
    Auth methods available on the server: LOGIN,PLAIN,XOAUTH2,PLAIN-CLIENTTOKEN,OAUTHBEARER,XOAUTH

    My Server Details:

    OS: Linux ubuntu-512mb-nyc2-01 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64
    PHP version: 5.5.9-1ubuntu4.14
    WordPress version: 4.5.1
    WordPress multisite: No
    openssl: Available
    allow_url_fopen: Enabled
    stream_socket_client: Available
    fsockopen: Available

    Any idea on how to troubleshoot this? I am at a dead-end. I have no other mail plugins setup.

    Reply
    • I sorted it out! 🙂

      On checking the apache2 error logs, found that curl_inti() was not being found. Basically, curl was not installed on the server. Installed php5-curl, restarted server and the test email went through.

      Thanks for the awesome plugin! 😀

      Reply
    • Same problem here, but it was working before.

      I have no ssh access to the server. Is there any other solution rather than installing php5-curl?

      Reply
    • I sorted it out.
      The website admin had changed the password and the authentication token became invalid.
      Did a fresh authentication and it’s working fine again 🙂

      Reply
      • I have exactly the same issue. I tried to delete the old credential on my gmail side and recreate a new one but still not working. No error message is shown. Can you tell me how you refreshed your token?

        Reply
  15. Hello,

    is there a way to check mail log?

    Reply
    • @cisco, Unfortunately there is no mail log at the moment.

      Reply
  16. Hi Admin,

    I’m having problem in grant permission. I keep getting HTTP ERROR 500: MySite is currently unable to handle this request. Where it cannot redirect after I click ALLOW
    My Server:

    OS: Windows NT NSTPNIE 5.2 build 3790 (Windows Server 2003 R2 Standard Edition Service Pack 2) i586
    PHP version: 5.4.31
    WordPress version: 4.5.2
    WordPress multisite: No
    openssl: Available
    allow_url_fopen: Enabled
    stream_socket_client: Available
    fsockopen: Available

    Reply
    • @Hardy, I can’t really troubleshoot this since I’m not logged into your gmail account. If it’s an issue on the developers console you should probably try it again later.

      Reply
      • Ok, do you what this error mean:

        Fatal error: Uncaught exception 'Google_IO_Exception' with message 'Failed to connect to accounts.google.com port 443: Timed out' in X:XXXXXXwp-contentpluginsgmail-smtpgoogle-api-php-clientsrcGoogleIOCurl.php:115 Stack trace: #0 X:XXXXXXwp-contentpluginsgmail-smtpgoogle-api-php-clientsrcGoogleIOAbstract.php(136): Google_IO_Curl->executeRequest(Object(Google_Http_Request)) #1 X:XXXXXXwp-contentpluginsgmail-smtpgoogle-api-php-clientsrcGoogleAuthOAuth2.php(111): Google_IO_Abstract->makeRequest(Object(Google_Http_Request)) #2 X:XXXXXXwp-contentpluginsgmail-smtpgoogle-api-php-clientsrcGoogleClient.php(128): Google_Auth_OAuth2->authenticate('4/VcjFJ9yZzCgPx...', false) #3 X:XXXXXXwp-contentpluginsgmail-smtpclass.phpmaileroauthgoogle.php(99): Google_Client->authenticate('4/VcjFJ9yZzCgPx...') #4 X:XXXXXXwp-contentpluginsgmail-smtpmain.php(132): GmailXOAuth2::resetCredentials('4/VcjFJ9yZzCgPx...') #5 [internal function]: GMAIL_SMTP->plugin in X:XXXXXXwp-contentpluginsgmail-smtpgoogle-api-php-clientsrcGoogleIOCurl.php on line 115

        Reply
      • Hi Admin,

        I’m getting an error as above. Is there any solution for this.

        Reply
        • @Hardy, I’m not sure what this error means either. I did some research with the error message. Some users are saying it’s a firewall issue on the server.

          Reply
  17. Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array ()
    SMTP ERROR: Failed to connect to server: Connection refused (111)
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

    OS: Linux n1plcpnl0005.prod.ams1.secureserver.net 2.6.32-673.8.1.lve1.4.3.el6.x86_64 #1 SMP Wed Feb 10 08:57:30 EST 2016 x86_64
    PHP version: 5.4.43
    WordPress version: 4.5.2
    WordPress multisite: No
    openssl: Available
    allow_url_fopen: Enabled
    stream_socket_client: Available
    fsockopen: Available

    I am using google apps gmail. Tell me whats going on please. 🙂

    Reply
    • @Muhammad, Did you check the troubleshooting section?

      Reply
  18. I get the following error:

    “400. That’s an error.

    Error: invalid_request

    Missing required parameter: client_id”

    Reply
  19. I love this plugin very much, but just wondering about one eFatal error: Uncaught Google_Auth_Exception: Error refreshing the OAuth2 token, message: ‘{ “error” : “invalid_grant” }’ in /home/ediblyco/public_html/wp-content/plugins/gmail-smtp/google-api-php-client/src/Google/Auth/OAuth2.php:363 Stack trace: #0 /home/ediblyco/public_html/wp-content/plugins/gmail-smtp/google-api-php-client/src/Google/Auth/OAuth2.php(276): Google_Auth_OAuth2->refreshTokenRequest(Array) #1 /home/ediblyco/public_html/wp-content/plugins/gmail-smtp/google-api-php-client/src/Google/Client.php(457): Google_Auth_OAuth2->refreshToken(‘1/2ME6Ob2yBVkie…’) #2 /home/ediblyco/public_html/wp-content/plugins/gmail-smtp/class.phpmaileroauthgoogle.php(142): Google_Client->refreshToken(‘1/2ME6Ob2yBVkie…’) #3 /home/ediblyco/public_html/wp-content/plugins/gmail-smtp/PHPMailer/class.smtp.php(471): GmailXOAuth2->getOauth64() #4 /home/ediblyco/public_html/wp-content/plugins/gmail-smtp/class.phpmaileroauth.php(152): SMTP->authenticate(”, ”, ‘XOAUTH2’, ”, ”, Object(GmailXOAuth2)) #5 /home/ediblyco/public_html/wp-cont in /home/ediblyco/public_html/wp-content/plugins/gmail-smtp/google-api-php-client/src/Google/Auth/OAuth2.php on line 363rror for authorization.

    This is error causing by this plugin.. so could you please help me for this issue?
    Thanks

    Reply
    • @Lowell, Please do the steps outlined in the “Fresh Authorization” section and see how it goes. Can you copy and paste the content from your “Server Info” tab?

      Reply
  20. I did all the set up again but I’m getting this message now

    401. That’s an error.

    Error: deleted_client

    The OAuth client was deleted.

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

    Reply
    • @Roy, Did you delete the app from your account? If so and you created a new app, please update the client ID and Client Secret in the settings.

      Reply
      • I went to the app section in my account and It wasn’t there. So I created a new app and updated everything but still nothing 🙁 I tried multiple times, and everytime I click grant permission, I get that error

        401. That’s an error.

        Error: deleted_client

        The OAuth client was deleted.

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

        Reply

Leave a Comment