Closed jimblue closed 6 years ago
What docs? Are you talking about the oauth plugin?
Nop the grav-plugin-email
docs: https://github.com/getgrav/grav-plugin-email#google-email
About oauth I'm saying that because I have an other app (Spark) that use gmail to send email and it's seems to use oauth:
As you can see this app is in gmail list of app that have an access (Grav is not here): it's in french again but basically it's a list off tierce app having access to some part of my account, here gmail
Google asked me only once if I authorised Spark to control email... Grav cool probably do the same nope?
Ah ok, you definitely do have to use a single-app password, bug that should still work as long as you are using TLS security. If that's still not working, the the issue is likely do do with Swiftmail itself, as all that authentication is handled via Swiftmail plugin. The Grav email plugin simply passes the values along. I will try to test this scenario though as I also have 2factor auth setup on my account.
Yep I'm using TLS.
Here are the settings I use in grav-email-plugin
to help:
Tell me if I can give you more information to help.
PS: If you didn't read the return content message on my first post the following should help:
Expected response code 250 but got code \"535\"
(At the end of the message)
Do you have your App password set in this section? Should not be with other Apps like Spark. Should be under the "Signing in to Google" section:
Just tested and it worked fine with this setup:
enabled: true
from: 'devs@getgrav.org'
to: 'username@gmail.com'
mailer:
engine: smtp
smtp:
server: smtp.gmail.com
port: 465
encryption: ssl
user: 'username@gmail.com'
password: 'mycustomapppassword'
also worked fine with port: 587
and encryption: tls
I think its something with your app password to be honest.
Yes my configuration was good, it's exactly the same as yours.
But I found something...
My SMTP login name is not a classical contact@gmail.com
but contact@mycompany.com
.
It's because I'm using gmail with a custom domain (trough G Suite).
So I just tried with a classical gmail address and an app password... ...guess what... it's working!
That's mean there is some kind of problem because the username is not .....@gmail.com
Do you have an idea why?
Nope, I actually used my @trilbymedia.com
google account when testing, so it's not that.
I don't get it...
Just by changing user from ...@mycompany.com
to ...@gmail.com
and password to the corresponding app password it's working...
You use @trilbymedia.com
with G suite too? I it's the case do you have any special configuration that could make the difference?
yes, you have to login with the email in question and generate your password for that email. I don't have a regular gmail one and a gsuite one, only gsuite and that's how i login and generate the app password.
Dam it, that's exactly what I do too... 😞
Thanks for you support Andy. I'll probably contact google, as I don't know what I can do on my side
For people running into the same issue while using G Suite follow this steps:
You know that was already documented in the README.md :)
Yes I know Andy but this setting is not in the same place in G suite.
@rhukster I suggest reopening this issue because Google Workspace (using Gmail) dropped the support for less secure password apps. It is recommended to use OAuth 2.0 to authenticate.
Hi,
I'm following all the steps from the
readme
for 2FA protected gmail account without success. It always returns me an error and gmail send me security email:the error header:
the error content:
the gmail security email: sorry it's in french but it's basically saying: "we just blocked a connexion trial to your account from an app with security risk"
To be sure my grav configuration was working I've made some test with an other gmail account but without 2FA and by activating
less secure apps
option. And this time It was working... Mails are properly send!Of course activating
less secure apps
is not an option for production for obvious reasons.If Grav is not consider by Google as secure maybe the best way would be to add an
oauth
solution for this plugin? (from what I've read on google...)I hope you have some kind of solution :)
Thank you