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 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)
- Go to Plugins->Add New from your WordPress admin dashboard
- Search for “gmail smtp naa986”
- Click Install once you have found it
Option 2 (Manual install)
- Download the zip version of the plugin
- Go to Plugins->Add New
- Click Upload Plugin
- Select the zip file on your computer
- Install it
Gmail SMTP Configuration
In order to get started with the plugin go to Settings->Gmail SMTP from your admin dashboard.
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.
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.
3. Choose how you want to configure and register your app. Since I’m not using G Suite I had to choose External.
4. Enter a name (e.g. Gmail SMTP) for the OAuth consent screen.
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.
6. Skip the Scopes screen.
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
I’m getting this log and mails are not sending:
SMTP -> get_lines(): $str is “250 SMTPUTF8”
SERVER -> CLIENT: 250-smtp.gmail.com at your service, [200.58.111.118]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
CLIENT -> SERVER: QUIT
SMTP -> get_lines(): $data is “”
SMTP -> get_lines(): $str is “221 2.0.0 closing connection 86sm22184793qky.92 – gsmtp”
SERVER -> CLIENT: 221 2.0.0 closing connection 86sm22184793qky.92 – gsmtp
Connection: closed
Hi, I’ve set a different mail for the FROM but the email is send with my gmail account. On the log, I see the right value but not on my email.
The email that I want to use I set it here > From Email Address (The email address which will be used as the From Address when sending an email.)
Do you have any idea?
Best
@daniel, Currently Gmail doesn’t allow you to change the From Email Address for security reasons.
When does this option From Email Address becomes available again? Or is there an other way to fix this? It is not really professional when the From Address is a gmail address….
@Kenneth, It will become available when Gmail starts supporting it. Currently, Gmail ignores it for security reasons.
@Admin, is this still the case?? I see example code that does set an custom from email address. Would like to get this working.
@Jurgen, Gmail still doesn’t allow it.
Server Info
Connection: opening to smtp.gmail.com:587, timeout=300, options=array ()
Connection failed. Error #2: stream_socket_client(): unable to connect to smtp.gmail.com:587 (Network is unreachable)
SMTP ERROR: Failed to connect to server: Network is unreachable (101)
@sanjeev, please contact your web host to make sure that port 587 is open and supports TLS encryption.
I get an error saying “deleted client”
I switched the client ID if that helps. I tried revoking and nothing. also tried removing and reinstalling the plugin…
@guido, When do you see this error? Do you still have the app in your Google developers account?
Wow, it looks like Google just made this way harder to do.
You must individually select which permissions the Gmail API key has access to, and if you select a “sensitive” one like sending mail on your behalf, then it requires a manual review process that can take several days.
The screenshots and process above are now sadly out of date…
https://www.dropbox.com/s/74s7xtijhwy0kuq/Screenshot%202018-12-20%2009.05.03.png?dl=0
https://www.dropbox.com/s/vnpf0pt4vlp36tb/Screenshot%202018-12-20%2009.05.23.png?dl=0
I am also coming up against this.
One of the suggestions is to join a group called “Allow Risky Access Permissions By Unreviewed Apps” but I can’t work out how to join it, says you have to be a member to see the posts, but no “request to join” buttons 🙁
Answer – set up HTTPS for all my sites? Let’s Encrypt… everything? Bit of a pain, but might have to do it.
Any other suggestions?
My client is getting this error code. I can’t seem to figure out why. Any ideas?
2018-12-26 15:51:46 Connection: opening to smtp.gmail.com:587, timeout=300, options=array ()
2018-12-26 15:51:48 Connection failed. Error #2: stream_socket_client(): unable to connect to smtp.gmail.com:587 (Connection refused)
[/home/content/a2pewpnaspod05_data05/09/41432909/html/wp-content/plugins/gmail-smtp/PHPMailer/class.smtp.php line 299]
2018-12-26 15:51:48 SMTP ERROR: Failed to connect to server: Connection refused (111)
SMTP connect() failed.
https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
@Mae, Please contact your web host to make sure that port 587 is open and supports TLS encryption.
I have contacted the web host and they confirmed that port 587 is open. We had everything up and running until a recent update of WordPress.
I am also facing the same thing. Did you get it resolved?
Unable to authorize, i am using google apps email
.
After clicking grant permission and selecting my email, next screen is HTTP Error 403 – Forbidden.
my htaccess file is not corrupted and site folder permission 755 and file permission 644
any help would be appreciated.
TIA
same ! help me please ?
Stop worked.
Something got changed at Google Cloud I assume it’s connected with OAuth verification.
Waiting for the dev’s answer
Simply doesn’t work! No error messages and I don’t receive the test email.
When I click Grant Permission it gives the following error:
400. That’s an error.
Error: redirect_uri_mismatch
The redirect URI in the request,
https://simples.com.br/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/85968203552-f1hrune7o42t98rmijk8cl6b0r1cgtas5.apps.googleusercontent.com?project=76968203652
@Leonardo, Please check the troubleshooting section
Hi admin,
The troubleshooting section above offer have solution to this issue.
Can you pls help us?
Thank you very much.
Hello. I installed and set up GMAIL SMTP to enable our website to send emails out when someone fills out a form. However, I get an error when I am finishing the set up. The error reads:
401. That’s an error.
Error: deleted_client
The OAuth client was deleted.
Request Details
response_type=code
access_type=offline
client_id=1017801312747-9tl8gf5r8167pfusrg8lnt0l82jp0q6a.apps.googleusercontent.com
redirect_uri=http://www.indebluerestaurant.com/wp-admin/options-general.php?page=gmail-smtp-settings&action=oauth_grant
state=
scope=https://mail.google.com/
approval_prompt=auto
Any suggestions of what I am doing wrong? I get this message after I click the Grant Permissions button in the setting window.
I followed the online directions and have done this over many times…but no success. Any help would be greatly appreciated.
@Robert, Can you please check to make sure that the app exists in your account?
This just stopped working for me after 3ish years of working fine. Only changes I made was updating plugins and updating PHP version from 7.2 to 7.3.
I rechecked everything and it all appears to be correct. Made new credentials and I keep getting the same error.
SERVER -> CLIENT: 250-smtp.gmail.com at your service, [69.175.61.114]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
SMTP Error: Could not authenticate.
CLIENT -> SERVER: QUIT
Sad to disable this for now, but not getting order emails.
@Anthony, Please check the “Fresh Authorization” section and see how it goes.
I’m getting the same exact SMTP Error: Could not authenticate as above after updating plugins and php to 7.3. Had to deactivate, but hoping you have a solutions.
Any ideas?
Thanks in advance!
I attempted the Fresh Authorization twice. Still the same error.
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 h1sm18976901pgv.93 – gsmtp”
SERVER -> CLIENT: 221 2.0.0 closing connection h1sm18976901pgv.93 – gsmtp
Connection: closed
@Anthony, can you please copy and paste the content from the “Server Info” tab?
I’m getting the same issue as @Anthony from what I can tell.
I refreshed several times with no luck. Need help, please!
Here’s what I get:
SERVER -> CLIENT: 250-smtp.gmail.com at your service, [2600:4c00:80:db::1]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
SMTP Error: Could not authenticate.
CLIENT -> SERVER: QUIT
SMTP -> get_lines(): $data is ""
SMTP -> get_lines(): $str is "221 2.0.0 closing connection o84sm5151653oif.24 - gsmtp"
SERVER -> CLIENT: 221 2.0.0 closing connection o84sm5151653oif.24 - gsmtp
Connection: closed
This is what’s on my server tab:
OS: Linux host.s8solutions.com 3.10.0-962.3.2.lve1.5.24.9.el7.x86_64 #1 SMP Wed Feb 13 08:24:50 EST 2019 x86_64
PHP version: 7.3.7
WordPress version: 5.2.2
WordPress multisite: No
openssl: Available
allow_url_fopen: Enabled
stream_socket_client: Available
fsockopen: Available
cURL: Available
cURL Version: 7.65.3, OpenSSL/1.0.2s
Used it for years successfully too, but now I’m getting the same exact error as above and all I did was update the plugins and Updated PHP to 7.3 as well. I’ve refreshed the authorization multiple times successfully, but it still gives me the same error.
Thoughts? It was a great plugin.
hi admin, other friends,
My email was working fine till last week, suddenly it stopped sending mail..
The problem seems linked to USER ID and password.
Please let me know where to set user ID and passwords in this plugin.
When i send test mail it gives message like ..
2019-07-22 04:20:23 SMTP -> get_lines(): $data is ""
2019-07-22 04:20:23 SMTP -> get_lines(): $str is "535-5.7.8 Username and Password not accepted. Learn more at"
2019-07-22 04:20:23 SMTP -> get_lines(): $data is "535-5.7.8 Username and Password not accepted. Learn more at"
2019-07-22 04:20:23 SMTP -> get_lines(): $str is "535 5.7.8 https://support.google.com/mail/?p=BadCredentials g4sm49595383pfo.93 - gsmtp"
2019-07-22 04:20:23 SERVER -> CLIENT: 535-5.7.8 Username and Password not accepted. Learn more at535 5.7.8 https://support.google.com/mail/?p=BadCredentials g4sm49595383pfo.93 - gsmtp
2019-07-22 04:20:23 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 g4sm49595383pfo.93 - gsmtp
2019-07-22 04:20:23 Connection: closed
Please reply asap
Regards
@Neeraj, This plugin doesn’t use password authentication. Have you made any changes to your Gmail account or the server?
hi everyone,
the email stopped working and i received an error below when i test email:
2019-07-29 05:04:20 Auth method requested: XOAUTH2
2019-07-29 05:04:20 Auth methods available on the server: LOGIN,PLAIN,XOAUTH2,PLAIN-CLIENTTOKEN,OAUTHBEARER,XOAUTH
2019-07-29 05:04:21 CLIENT -> SERVER: AUTH XOAUTH2 dXNlcj1vcmRlcnNAbWlzdGVybW9iaWxlLmNvbS5zZwFhdXRoPUJlYXJlciABAQ==
2019-07-29 05:04:21 SMTP -> get_lines(): $data is ""
2019-07-29 05:04:21 SMTP -> get_lines(): $str is "334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ=="
2019-07-29 05:04:21 SERVER -> CLIENT: 334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ==
2019-07-29 05:04:21 SMTP ERROR: AUTH command failed: 334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ==
SMTP Error: Could not authenticate.
2019-07-29 05:04:21 CLIENT -> SERVER: QUIT
2019-07-29 05:04:21 SMTP -> get_lines(): $data is ""
2019-07-29 05:04:21 SMTP -> get_lines(): $str is "535-5.7.8 Username and Password not accepted. Learn more at"
2019-07-29 05:04:21 SMTP -> get_lines(): $data is "535-5.7.8 Username and Password not accepted. Learn more at"
2019-07-29 05:04:21 SMTP -> get_lines(): $str is "535 5.7.8 https://support.google.com/mail/?p=BadCredentials z19sm52258399pgv.35 - gsmtp"
2019-07-29 05:04:21 SERVER -> CLIENT: 535-5.7.8 Username and Password not accepted. Learn more at535 5.7.8 https://support.google.com/mail/?p=BadCredentials z19sm52258399pgv.35 - gsmtp
2019-07-29 05:04:21 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 z19sm52258399pgv.35 - gsmtp
2019-07-29 05:04:21 Connection: closed
the only probable cause is my boss changed the email’s password. do i need to re-authenticate or do is there any other way to solve this issue will be appreciated! thanks in advance
@kevin, The plugin doesn’t use your password to authenticate. But Google might be blocking the app since the password was changed recently. Please check the “Fresh Authorization” section and see how it goes.
I also have the same exact SMTP Error: Could not authenticate as above after updating to PHP 7.3. I rolled back to PHP 7.2 and the plugin works again.
Please let us know when it will be compatible with PHP 7.3
I rolled back as well (to 7.2) and it works again. Maybe you’ll find what’s not happy in your plugin by checking the incompatibilities with 7.3 and 7.2
https://www.php.net/manual/en/migration73.incompatible.php
Please let us know when it’s been updated for 7.3.
Followed all of the steps with precision and every time I select Grant Permissions get the error message ‘this site is experiencing technical difficulties please check your site inbox for details (how when the bloody thing won’t work). Is very annoying to say the least! Does this work for WP installs on GCP?
Hi there,
I have the same trouble as above. We had a staff member leave and we had to reset the settings with a new account on Google Developers Console. I revoked access and then started afresh, but we get this same BAD CREDENTIALS message.
The set up process has changed as there’s a whole new Oauth Consent process. But it all looked ok. We are using PHP 7.2 anyway, so no chance that’s the issue.
Can you help?
Thanks
2019-08-28 13:14:12 Connection: opening to smtp.gmail.com:587, timeout=300, options=array ()
2019-08-28 13:14:12 Connection: opened
2019-08-28 13:14:12 SMTP -> get_lines(): $data is “”
2019-08-28 13:14:12 SMTP -> get_lines(): $str is “220 smtp.gmail.com ESMTP p19sm2591692wmg.31 – gsmtp”
2019-08-28 13:14:12 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP p19sm2591692wmg.31 – gsmtp
2019-08-28 13:14:12 CLIENT -> SERVER: EHLO sylk.co.uk
2019-08-28 13:14:12 SMTP -> get_lines(): $data is “”
2019-08-28 13:14:12 SMTP -> get_lines(): $str is “250-smtp.gmail.com at your service, [149.255.57.156]”
2019-08-28 13:14:12 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [149.255.57.156]”
2019-08-28 13:14:12 SMTP -> get_lines(): $str is “250-SIZE 35882577”
2019-08-28 13:14:12 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [149.255.57.156]250-SIZE 35882577”
2019-08-28 13:14:12 SMTP -> get_lines(): $str is “250-8BITMIME”
2019-08-28 13:14:12 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [149.255.57.156]250-SIZE 35882577250-8BITMIME”
2019-08-28 13:14:12 SMTP -> get_lines(): $str is “250-STARTTLS”
2019-08-28 13:14:12 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [149.255.57.156]250-SIZE 35882577250-8BITMIME250-STARTTLS”
2019-08-28 13:14:12 SMTP -> get_lines(): $str is “250-ENHANCEDSTATUSCODES”
2019-08-28 13:14:12 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [149.255.57.156]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES”
2019-08-28 13:14:12 SMTP -> get_lines(): $str is “250-PIPELINING”
2019-08-28 13:14:12 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [149.255.57.156]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING”
2019-08-28 13:14:12 SMTP -> get_lines(): $str is “250-CHUNKING”
2019-08-28 13:14:12 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [149.255.57.156]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING”
2019-08-28 13:14:12 SMTP -> get_lines(): $str is “250 SMTPUTF8”
2019-08-28 13:14:12 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [149.255.57.156]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
2019-08-28 13:14:12 CLIENT -> SERVER: STARTTLS
2019-08-28 13:14:12 SMTP -> get_lines(): $data is “”
2019-08-28 13:14:12 SMTP -> get_lines(): $str is “220 2.0.0 Ready to start TLS”
2019-08-28 13:14:12 SERVER -> CLIENT: 220 2.0.0 Ready to start TLS
2019-08-28 13:14:12 CLIENT -> SERVER: EHLO sylk.co.uk
2019-08-28 13:14:12 SMTP -> get_lines(): $data is “”
2019-08-28 13:14:12 SMTP -> get_lines(): $str is “250-smtp.gmail.com at your service, [149.255.57.156]”
2019-08-28 13:14:12 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [149.255.57.156]”
2019-08-28 13:14:12 SMTP -> get_lines(): $str is “250-SIZE 35882577”
2019-08-28 13:14:12 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [149.255.57.156]250-SIZE 35882577”
2019-08-28 13:14:12 SMTP -> get_lines(): $str is “250-8BITMIME”
2019-08-28 13:14:12 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [149.255.57.156]250-SIZE 35882577250-8BITMIME”
2019-08-28 13:14:12 SMTP -> get_lines(): $str is “250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH”
2019-08-28 13:14:12 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [149.255.57.156]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH”
2019-08-28 13:14:12 SMTP -> get_lines(): $str is “250-ENHANCEDSTATUSCODES”
2019-08-28 13:14:12 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [149.255.57.156]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES”
2019-08-28 13:14:12 SMTP -> get_lines(): $str is “250-PIPELINING”
2019-08-28 13:14:12 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [149.255.57.156]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING”
2019-08-28 13:14:12 SMTP -> get_lines(): $str is “250-CHUNKING”
2019-08-28 13:14:12 SMTP -> get_lines(): $data is “250-smtp.gmail.com at your service, [149.255.57.156]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING”
2019-08-28 13:14:12 SMTP -> get_lines(): $str is “250 SMTPUTF8”
2019-08-28 13:14:12 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [149.255.57.156]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
2019-08-28 13:14:12 Auth method requested: XOAUTH2
2019-08-28 13:14:12 Auth methods available on the server: LOGIN,PLAIN,XOAUTH2,PLAIN-CLIENTTOKEN,OAUTHBEARER,XOAUTH
2019-08-28 13:14:14 CLIENT -> SERVER: AUTH XOAUTH2 dXNlcj1ob2xsaWVAc3lsay5jby51awFhdXRoPUJlYXJlciABAQ==
2019-08-28 13:14:14 SMTP -> get_lines(): $data is “”
2019-08-28 13:14:14 SMTP -> get_lines(): $str is “334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ==”
2019-08-28 13:14:14 SERVER -> CLIENT: 334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ==
2019-08-28 13:14:14 SMTP ERROR: AUTH command failed: 334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ==
SMTP Error: Could not authenticate.
2019-08-28 13:14:14 CLIENT -> SERVER: QUIT
2019-08-28 13:14:14 SMTP -> get_lines(): $data is “”
2019-08-28 13:14:14 SMTP -> get_lines(): $str is “535-5.7.8 Username and Password not accepted. Learn more at”
2019-08-28 13:14:14 SMTP -> get_lines(): $data is “535-5.7.8 Username and Password not accepted. Learn more at”
2019-08-28 13:14:14 SMTP -> get_lines(): $str is “535 5.7.8
https://support.google.com/mail/?p=BadCredentials
p19sm2591692wmg.31 – gsmtp”2019-08-28 13:14:14 SERVER -> CLIENT: 535-5.7.8 Username and Password not accepted. Learn more at535 5.7.8
https://support.google.com/mail/?p=BadCredentials
p19sm2591692wmg.31 – gsmtp2019-08-28 13:14:14 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
p19sm2591692wmg.31 – gsmtp2019-08-28 13:14:14 Connection: closed
SMTP connect() failed.
https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
@cheryl, The plugin doesn’t really use username or password for authentication. When did it stop working? Have you changed your Google account password recently?
Hello,
I am receiving the following error:
The response from the server was 550 No such User Here.
I am sending to my own email to test and it is telling me that the email address does not exist.
Can you help?
Thank you.
@CHRISTOPHER, What email are you using for oAuth and the recipient?
Can I use this plugin for contact us form.
@Sandeep, The plugin doesn’t create any contact form. However, your contact form emails should go through SMTP configured in the plugin.
Am getting this error Admin. What could be the issue? Everything is set up well and running even my host has port 587 for TLS open and SSL at 465. What could be the challenge here? I keep getting this error messages:
TLS
2019-09-12 13:12:31 Connection: opening to smtp.gmail.com:587, timeout=300, options=array ()
2019-09-12 13:12:32 Connection failed. Error #2: stream_socket_client(): unable to connect to smtp.gmail.com:587 (Connection refused) [/home/s0h3dl10k542/public_html/gabsonschool.com.ng/wp-content/plugins/gmail-smtp/PHPMailer/class.smtp.php line 298]
2019-09-12 13:12:32 SMTP ERROR: Failed to connect to server: Connection refused (111)
SMTP connect() failed.
https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
SSL
2019-09-12 13:21:51 Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array ()
2019-09-12 13:21:52 Connection failed. Error #2: stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 (Connection refused) [/home/s0h3dl10k542/public_html/gabsonschool.com.ng/wp-content/plugins/gmail-smtp/PHPMailer/class.smtp.php line 298]
2019-09-12 13:21:52 SMTP ERROR: Failed to connect to server: Connection refused (111)
SMTP connect() failed.
https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
@Dapo, It appears the plugin is not being able to connect to the remote SMTP server. Does your web host block external SMTP connection?