When I try to grant permission I get a critical error message on the page ??
can you help ?
]]>I saw 2 topics about this but no solution. I have to be checking the plugin once a week and remove access to grant permission again because it keeps getting user/password not accepted when I haven′t changed them. I′m missing work opportunities because I see the forms sent too late.
What do I need to check to solve this?
]]>You correctly state in the settings that the “From” field does not work if it is different than the OAuth mail.
What’s the point of having it there since it is ignored by google? It only makes the plugin look like it doesn’t work.
]]>The plugin seems to be incompatible with the “WP Mail Logging” plugin.
I have been using basic wp_mail for a couple of years with a couple of small customisations. Sender is an address from a Google workspace account, with appropriate SPF and DKIM from the web host as allowable sender. Now my ISP is throttling some alerts, so I need to use GMail servers directly.
The setup of your plugin worked, I created the credentials eventually and got the green tick for SMTP status all set up. It was still giving a red alert saying I needed to input credentials or grant permission – even after I had done both. So that is a bug, as it must have needed something else, but did not say what.
The next problem was send a test email. That worked (apparently). Except: it was still using the web host’s smtp server, not GMail’s. So it all seemed to work, the email arrived, but I had to inspect the headers to check the path.
The only hint was that the “From:” value had changed from the email address I had configured in WP admin settings to “wordpress@my-test-domain”. Luckily the envelope sender remained at the value I had assigned, so spf and dkim still passed
I then disabled the “WP Mail Logging” plugin and the test email went through the expected GMail path. I was very surprised to also see the packet flow for the test email appearing in the test email tab – please put a notice there to tell users what to expect in a properly working system, and show an example in the guide.
I presume by options are either disable logging, or use a bloated alternative.
]]>Everything works but I have the following error message “Gmail SMTP plugin cannot send email until you enter your credentials in the settings and grant access to your web application.”
How do I get rid of this message?
]]>There was recently another Topic about having to constantly reauthorize the connection. I am having the same issue which has been ongoing now for a few months. Every week or so, emails will stop sending and I must revoke access to this plugin, then grant access again (without changing credentials or anything else). My OAuth Consent Screen shows my app status as “In Production”. Any ideas what could be happening here?
]]>How many emails are possible to send with Gmail SMTP? Are there any restrictions per hour, day, etc.?
Thanks
]]>Hi,
I appreciate this plugin, it’s a real nice and simple way to make sure some basic mailflows on my low-traffic WordPress sites is working.
I was wondering though – would it be possible to set some of the configuration variables through wp-config defines? Especially the client-id and the client-secret come to mind. This way I can add it to my secret-management solution, that is able to auto-populate wp-config with all the secrets needed.
If this is interesting, I’m more than happy to try to contribute this feature, and submit a patch or PR somewhere.
Kind regards,
Wietse
]]>Is this feature possible to gain with this plugin?
Ability to add unlimited SMTP accounts and allow sending from the same email address.
Rotate the sending method from multiple methods per second, minutes, per hour, per day (to avoid the free limit of SMTP providers such as Gmail).
Limit sending amount per second, minutes, per hour, per day (to avoid the free limit of SMTP providers such as Gmail).
]]>Receiving an error from Google when trying to grant permissions:
Access blocked: This app’s request is invalid
You can’t sign in because this app sent an invalid request. You can try again later, or contact the developer about this issue. Learn more about this error
If you are a developer of this app, see error details.
Error 400: redirect_uri_mismatch
]]>I can’t grant access no matter what I do. It just saying that I don’t have permission to the app. I have followed the instructions from the video but it don’t working. I also have the plugin to my other website and it’s working well, but now it don’t want to work to my second website …, Please help!
]]>Hello. We have been using your plugin on multiple sites. It works well when it is initially setup, however over time the OAuth connection to Gmail expires and the site will stop sending emails.
Going through, revoking and readding the access makes it work for awhile longer, but after awhile it expires again. We have to correct this issue a few times a year. Now our clients are wondering why their site isn’t consistent.
I would love to be able to setup this connection and trust that it will keep sending.
]]>I set up your plugin but cannot send test emails and my contact form is not reaching its gmail destination.
With or without SSL / TLS 465 / 587.
So, I have been researching.
Should my gmail account IMAP settings be enabled ?
Should I add my gmail address to my server ?
Are there any other settings I should be concerned with ?
Should there be any changes to my DNS records, etc. ?
]]>Gmail SMTP v1.2.3.8
Test email feature is not working. Received the following error:
2023-04-24 10:53:44 Connection: opening to smtp.gmail.com:587, timeout=300, options=array()
2023-04-24 10:53:45 Connection failed. Error #2: stream_socket_client(): Unable to connect to smtp.gmail.com:587 (Network is unreachable) [/home/zkgbh9yy9b5d/public_html/wp-includes/PHPMailer/SMTP.php line 389]
2023-04-24 10:53:45 SMTP ERROR: Failed to connect to server: Network is unreachable (101)
SMTP connect() failed
Server Info:
OS: Linux p3plzcpnl469082.prod.phx3.secureserver.net 2.6.32-954.3.5.lve1.4.90.el6.x86_64 #1 SMP Tue Feb 21 12:26:30 UTC 2023 x86_64
PHP version: 8.1.16
WordPress version: 6.2
WordPress multisite: No
openssl: Available
allow_url_fopen: Enabled
stream_socket_client: Available
fsockopen: Available
cURL: Available
cURL Version: 7.84.0, OpenSSL/1.1.1p
In the General settings tab of your plugin, under From Email Address you state
Gmail currently ignores this value if it is different from the OAuth Email Address.
It works fine, but you must first add it as per these instructions in Gmail’s settings under Accounts > Send mail as.
Another issue is that when using the form in the Test Email tab, the fields are not stripped of backslashes (I hope that’s not a problem elsewhere in your form handling), and the whitespace in the Message box is not preserved (ends up as a single line of text).
Besides that, thanks for this great plugin.
]]>I get this error2023-03-17 11:33:31 Connection: opening to smtp.gmail.com:587, timeout=300, options=array()
2023-03-17 11:33:31 Connection: opened
2023-03-17 11:33:31 SMTP INBOUND: "220 smtp.gmail.com ESMTP q21-20020a170906a09500b009226f644a07sm861518ejy.139 - gsmtp"
2023-03-17 11:33:31 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP q21-20020a170906a09500b009226f644a07sm861518ejy.139 - gsmtp
2023-03-17 11:33:31 CLIENT -> SERVER: EHLO pixelslove.art
2023-03-17 11:33:31 SMTP INBOUND: "250-smtp.gmail.com at your service, [162.0.217.27]"
2023-03-17 11:33:31 SMTP INBOUND: "250-SIZE 35882577"
2023-03-17 11:33:31 SMTP INBOUND: "250-8BITMIME"
2023-03-17 11:33:31 SMTP INBOUND: "250-STARTTLS"
2023-03-17 11:33:31 SMTP INBOUND: "250-ENHANCEDSTATUSCODES"
2023-03-17 11:33:31 SMTP INBOUND: "250-PIPELINING"
2023-03-17 11:33:31 SMTP INBOUND: "250-CHUNKING"
2023-03-17 11:33:31 SMTP INBOUND: "250 SMTPUTF8"
2023-03-17 11:33:31 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [162.0.217.27]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
2023-03-17 11:33:31 CLIENT -> SERVER: STARTTLS
2023-03-17 11:33:31 SMTP INBOUND: "220 2.0.0 Ready to start TLS"
2023-03-17 11:33:31 SERVER -> CLIENT: 220 2.0.0 Ready to start TLS
2023-03-17 11:33:31 CLIENT -> SERVER: EHLO pixelslove.art
2023-03-17 11:33:31 SMTP INBOUND: "250-smtp.gmail.com at your service, [162.0.217.27]"
2023-03-17 11:33:31 SMTP INBOUND: "250-SIZE 35882577"
2023-03-17 11:33:31 SMTP INBOUND: "250-8BITMIME"
2023-03-17 11:33:31 SMTP INBOUND: "250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH"
2023-03-17 11:33:31 SMTP INBOUND: "250-ENHANCEDSTATUSCODES"
2023-03-17 11:33:31 SMTP INBOUND: "250-PIPELINING"
2023-03-17 11:33:31 SMTP INBOUND: "250-CHUNKING"
2023-03-17 11:33:31 SMTP INBOUND: "250 SMTPUTF8"
2023-03-17 11:33:31 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [162.0.217.27]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
2023-03-17 11:33:31 Auth method requested: UNSPECIFIED
2023-03-17 11:33:31 Auth methods available on the server: LOGIN,PLAIN,XOAUTH2,PLAIN-CLIENTTOKEN,OAUTHBEARER,XOAUTH
2023-03-17 11:33:31 Requested auth method not available:
2023-03-17 11:33:31 Auth method selected: LOGIN
2023-03-17 11:33:31 CLIENT -> SERVER: AUTH LOGIN
2023-03-17 11:33:31 SMTP INBOUND: "334 VXNlcm5hbWU6"
2023-03-17 11:33:31 SERVER -> CLIENT: 334 VXNlcm5hbWU6
2023-03-17 11:33:31 CLIENT -> SERVER: aXdhbm9mZi45NEBnbWFpbC5jb20=
2023-03-17 11:33:31 SMTP INBOUND: "334 UGFzc3dvcmQ6"
2023-03-17 11:33:31 SERVER -> CLIENT: 334 UGFzc3dvcmQ6
2023-03-17 11:33:31 CLIENT -> SERVER: emhoYXBiY3JfMjQwNw==
2023-03-17 11:33:31 SMTP INBOUND: "534-5.7.9 Application-specific password required. Learn more at"
2023-03-17 11:33:31 SMTP INBOUND: "534 5.7.9 https://support.google.com/mail/?p=InvalidSecondFactor q21-20020a170906a09500b009226f644a07sm861518ejy.139 - gsmtp"
2023-03-17 11:33:31 SERVER -> CLIENT: 534-5.7.9 Application-specific password required. Learn more at534 5.7.9 https://support.google.com/mail/?p=InvalidSecondFactor q21-20020a170906a09500b009226f644a07sm861518ejy.139 - gsmtp
2023-03-17 11:33:31 SMTP ERROR: Password command failed: 534-5.7.9 Application-specific password required. Learn more at534 5.7.9 https://support.google.com/mail/?p=InvalidSecondFactor q21-20020a170906a09500b009226f644a07sm861518ejy.139 - gsmtp
SMTP Error: Could not authenticate.
2023-03-17 11:33:31 CLIENT -> SERVER: QUIT
2023-03-17 11:33:31 SMTP INBOUND: "221 2.0.0 closing connection q21-20020a170906a09500b009226f644a07sm861518ejy.139 - gsmtp"
2023-03-17 11:33:31 SERVER -> CLIENT: 221 2.0.0 closing connection q21-20020a170906a09500b009226f644a07sm861518ejy.139 - gsmtp
2023-03-17 11:33:31 Connection: closed
SMTP Error: Could not authenticate.
Not sure why but you had semantic version numbers to begin with then broke them by going to 4-part numbers. E.g. latest release is not backwards compatible because it doesn’t run on WP 6.0 so it should be a major version bump but you have it as less than a patch.
You only have releases up to 1.2.0 tagged in SVN.
]]>I am now plagued by Guzzle errors ??
PHP Fatal error: Uncaught Error: Call to undefined function GuzzleHttp\Psr7\uri_for() in /wp-content/plugins/gmail-smtp/google-api-php-client/vendor/google/auth/src/OAuth2.php:1245
Site uses Woo Bookings that has Guzzle as well.
]]>My hosting support insisted on the theory that when I updated from version 1.2.3.2 to 1.2.3.4 Gmail SMTP plugin inserted a line of code in the wp-config file as follows:
/** HTTPS */
define('FORCE_SSL_ADMIN', true);
This then results in a duplicated code in the wp-config file, resulting in an error message visible on the front and back end of the site.
They said:
Here the error was:
Update failed: ( ! ) Warning: Constant FORCE_SSL_ADMIN already defined in /home/xxxxxxx.cloudwaysapps.com/xxxxxxx/public_html/xx/wp-config.php on line 73 Call Stack #TimeMemoryFunctionLocation 10.0010382784{main}( ).../admin-ajax.php:0 20.0010383344require_once( '/home/xxxxxxx.cloudwaysapps.com/xxxxxxx/public_html/xx/wp-load.php ).../admin-ajax.php:22 30.0011384168require_once( '/home/xxxxxxx.cloudwaysapps.com/xxxxxxx/public_html/im/wp-config.php ).../wp-load.php:50 40.0011384576define( $constant_name = 'FORCE_SSL_ADMIN', $value = TRUE ).../wp-config.php:73 {"success":true,"data":{"update":"plugin","slug":"gmail-smtp","oldVersion":"Version 1.2.3.2","newVersion":"Version 1.2.3.4","plugin":"gmail-smtp\/main.php","pluginName":"Gmail SMTP"}}
From the above error, it is clear that, GMAIL-SMTP plugin was trying to define this constant. Kindly review this with your developer.
I will be grateful if you enlighten me.
Thanks
]]>Hi, I’m getting this warning message:
Warning: Undefined array key "access_token" in /var/www/htdocs/wp-content/plugins/gmail-smtp/class.phpmaileroauthgoogle.php on line 192
WP 6.1.1
PHP 8.1
Regards.
]]>Hi there!
I tried to make your plugin work but I am getting these warnings all the time:
ttps://support.google.com/cloud/answer/7454865#unverified-app-screen
I have installed and configured, and the test mail is successfully delivered to an external address.
However: I keep getting the “Gmail SMTP plugin cannot send email until you enter your credentials in the settings and grant access to your web application.” banner, and the SMTP Status on the plugin config page reports “Not Connected”.
Any idea what to do?
Tnx. in advance
]]>I assume this requires access to the client gsuite account to setup, which is a problem, as this also requires 2 factor authentication.
Also whats happens if the client change their password, won’t this also reset the API access authorisation as well?
]]>responce was: 550 5.7.26 unauthenticated email from mydomain.com is not acepted due DMARC policy.
any sugestions thanks
]]>Hello! I am not familiar with google developers console. Is that a paid service?
]]>Hi,
I am new to Gmail SMTP.
I am looking to setup general contact forms on my website. Its only to be used as a contact or feedback form.
Are there any particular forms plugin that is compatible with Gmail SMTP?
Suggestions would be appreciated.
I was using WP Forms but that seems to want to use its on pricy SMTP plugin.
I like this Gmail SMTP plugin but now I need to find a forms plugin.
thanks
]]>Where do I key the app password Gmail requires now?
Hello,
It’s likely related to Google enforcing 2FA starting right around Dec 9th.
I believe you need to create an app password and update wordpress with it: https://support.google.com/accounts/answer/185833?hl=en
Originally I used a GOOGLE WORKSPACE GROUP for the sender of emails and created the OAUTH credentials using my own email address. This had not worked well, as I continually get copied on all the email messages sent by the server.
I created new credentials, but my staging and production sites remain in the connected state, so I cannot test the new OAUTH.
Wondering how to reset the connection so I can test in STAGING, without affecting PRODUCTION.
Thanks,
Daryl
hello I installed smtp gmail API plugin and I get this error
2021-11-12 22:16:16 Connection: opening to smtp.gmail.com:587, timeout=300, options=array ( ‘ssl’ => array ( ‘verify_peer’ => false, ‘verify_peer_name’ => false, ‘allow_self_signed’ => true, ),)
2021-11-12 22:16:16 Connection: opened
2021-11-12 22:16:16 SMTP INBOUND: “220-sk1.f7-networks.com ESMTP Exim 4.94.2 #2 Fri, 12 Nov 2021 23:16:16 +0100”
2021-11-12 22:16:16 SMTP INBOUND: “220-We do not authorize the use of this system to transport unsolicited,”
2021-11-12 22:16:16 SMTP INBOUND: “220 and/or bulk e-mail.”
2021-11-12 22:16:16 SERVER -> CLIENT: 220-sk1.f7-networks.com ESMTP Exim 4.94.2 #2 Fri, 12 Nov 2021 23:16:16 +0100 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail.
2021-11-12 22:16:16 CLIENT -> SERVER: EHLO https://www.roqya-coach.com
2021-11-12 22:16:16 SMTP INBOUND: “250-sk1.f7-networks.com Hello https://www.roqya-coach.com [5.182.210.39]”
2021-11-12 22:16:16 SMTP INBOUND: “250-SIZE 52428800”
2021-11-12 22:16:16 SMTP INBOUND: “250-8BITMIME”
2021-11-12 22:16:16 SMTP INBOUND: “250-PIPELINING”
2021-11-12 22:16:16 SMTP INBOUND: “250-PIPE_CONNECT”
2021-11-12 22:16:16 SMTP INBOUND: “250-AUTH PLAIN LOGIN”
2021-11-12 22:16:16 SMTP INBOUND: “250-STARTTLS”
2021-11-12 22:16:16 SMTP INBOUND: “250 HELP”
2021-11-12 22:16:16 SERVER -> CLIENT: 250-sk1.f7-networks.com Hello https://www.roqya-coach.com [5.182.210.39]250-SIZE 52428800250-8BITMIME250-PIPELINING250-PIPE_CONNECT250-AUTH PLAIN LOGIN250-STARTTLS250 HELP
2021-11-12 22:16:16 CLIENT -> SERVER: STARTTLS
2021-11-12 22:16:16 SMTP INBOUND: “220 TLS go ahead”
2021-11-12 22:16:16 SERVER -> CLIENT: 220 TLS go ahead
2021-11-12 22:16:16 CLIENT -> SERVER: EHLO https://www.roqya-coach.com
2021-11-12 22:16:16 SMTP INBOUND: “250-sk1.f7-networks.com Hello https://www.roqya-coach.com [5.182.210.39]”
2021-11-12 22:16:16 SMTP INBOUND: “250-SIZE 52428800”
2021-11-12 22:16:16 SMTP INBOUND: “250-8BITMIME”
2021-11-12 22:16:16 SMTP INBOUND: “250-PIPELINING”
2021-11-12 22:16:16 SMTP INBOUND: “250-PIPE_CONNECT”
2021-11-12 22:16:16 SMTP INBOUND: “250-AUTH PLAIN LOGIN”
2021-11-12 22:16:16 SMTP INBOUND: “250 HELP”
2021-11-12 22:16:16 SERVER -> CLIENT: 250-sk1.f7-networks.com Hello https://www.roqya-coach.com [5.182.210.39]250-SIZE 52428800250-8BITMIME250-PIPELINING250-PIPE_CONNECT250-AUTH PLAIN LOGIN250 HELP
2021-11-12 22:16:16 Auth method requested: XOAUTH2
2021-11-12 22:16:16 Auth methods available on the server: PLAIN,LOGIN
2021-11-12 22:16:16 Requested auth method not available: XOAUTH2
2021-11-12 22:16:16 Auth method selected: LOGIN
2021-11-12 22:16:16 CLIENT -> SERVER: AUTH LOGIN
2021-11-12 22:16:16 SMTP INBOUND: “334 VXNlcm5hbWU6”
2021-11-12 22:16:16 SERVER -> CLIENT: 334 VXNlcm5hbWU6
2021-11-12 22:16:16 CLIENT -> SERVER:
2021-11-12 22:16:18 SMTP INBOUND: “535 Incorrect authentication data”
2021-11-12 22:16:18 SERVER -> CLIENT: 535 Incorrect authentication data
2021-11-12 22:16:18 SMTP ERROR: Username command failed: 535 Incorrect authentication data
SMTP Error: Could not authenticate.
2021-11-12 22:16:18 CLIENT -> SERVER: QUIT
2021-11-12 22:16:18 SMTP INBOUND: “221 sk1.f7-networks.com closing connection”
2021-11-12 22:16:18 SERVER -> CLIENT: 221 sk1.f7-networks.com closing connection
2021-11-12 22:16:18 Connection: closed
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
GRANT PERMISSION
Authorization Error
Error 400: redirect_uri_mismatch
You can’t sign in to this app because it doesn’t comply with Google’s OAuth 2.0 policy.
If you’re the app developer, register the redirect URI in the Google Cloud Console.`
PS. Plugin is working fine!!!