R
Railway•6mo ago
Baldbytes

Cant get Gmail working in the Plane Template

Hey, i cant send emails via Gmail inside the Plane Template for Railway. The Error i get is:
fd12:895f:7cc3::37:cf70:701c:45824 - "GET /api/workspaces/tecdip/invitations/ HTTP/1.1" 200

fd12:895f:7cc3::37:cf70:701c:45826 - "GET /api/workspaces/tecdip/users/notifications/unread/ HTTP/1.1" 200

handled request

handled request

WARNING 2024-06-16 12:37:02,646 log 14 139781915061048 Bad Request: /api/instances/email-credentials-check/

fd12:895f:7cc3::37:cf70:701c:49104 - "POST /api/instances/email-credentials-check/ HTTP/1.1" 400

handled request
fd12:895f:7cc3::37:cf70:701c:45824 - "GET /api/workspaces/tecdip/invitations/ HTTP/1.1" 200

fd12:895f:7cc3::37:cf70:701c:45826 - "GET /api/workspaces/tecdip/users/notifications/unread/ HTTP/1.1" 200

handled request

handled request

WARNING 2024-06-16 12:37:02,646 log 14 139781915061048 Bad Request: /api/instances/email-credentials-check/

fd12:895f:7cc3::37:cf70:701c:49104 - "POST /api/instances/email-credentials-check/ HTTP/1.1" 400

handled request
which seems weird to me because every other api is working correctly.
No description
41 Replies
Percy
Percy•6mo ago
Project ID: 1c60876b-829c-413a-9391-fb43dc9fb231
Baldbytes
BaldbytesOP•6mo ago
1c60876b-829c-413a-9391-fb43dc9fb231
Fragly
Fragly•6mo ago
GMAIL SMTP is somewhat unreliable on Railway I've managed to get it working by using port 587 and turning TLS off
Baldbytes
BaldbytesOP•6mo ago
ok let me try that
Baldbytes
BaldbytesOP•6mo ago
@Fragly did you set it up like this?
No description
Fragly
Fragly•6mo ago
Yea, that seems about right
Baldbytes
BaldbytesOP•6mo ago
still failed to send the email
Fragly
Fragly•6mo ago
did you specify your username and password at the bottom?
Baldbytes
BaldbytesOP•6mo ago
but my instance is also still running on the railway url: "https://plane-production-6632.up.railway.app/god-mode/email/" nope
Fragly
Fragly•6mo ago
I'm pretty sure that is required for any gmail smtp
Fragly
Fragly•6mo ago
here's my setup
No description
Fragly
Fragly•6mo ago
( slightly older version of plane )
Baldbytes
BaldbytesOP•6mo ago
how did you setup the gmail for this? is this just your email with the sso password? i did read that the sso password differs from the email password
Fragly
Fragly•6mo ago
In my gmail settings I set up custom emails here:
No description
Fragly
Fragly•6mo ago
the username would then be the base gmail account's email and the send as would be the email you added here ^ the password is an "App Password" that you can create in your google account (requires 2fa enabled) by going to your 2fa settings and going to app password ( I think, I set these up a long time ago so I may be misremembering the exact details )
Baldbytes
BaldbytesOP•6mo ago
where can i find this app passwords? i did read this but i am unable to find the point where to setup this app
Fragly
Fragly•6mo ago
Google Account -> Security -> 2-Step Verification -> App Passwords
Baldbytes
BaldbytesOP•6mo ago
thanks
Fragly
Fragly•6mo ago
no problem!
Baldbytes
BaldbytesOP•6mo ago
Still no success with the app password
No description
Baldbytes
BaldbytesOP•6mo ago
its so weird that i cant even see the reason for it
Fragly
Fragly•6mo ago
try turning email security off
Baldbytes
BaldbytesOP•6mo ago
No description
Baldbytes
BaldbytesOP•6mo ago
Plane hates me, the only reason i can think off 😄
Fragly
Fragly•6mo ago
:PepeThink:
Baldbytes
BaldbytesOP•6mo ago
and i cant even see any error message in the api container
Fragly
Fragly•6mo ago
and you did add the email to your Gmail settings, right?
Baldbytes
BaldbytesOP•6mo ago
WARNING 2024-06-16 13:44:01,178 log 14 139781915061048 Bad Request: /api/instances/email-credentials-check/
WARNING 2024-06-16 13:44:01,178 log 14 139781915061048 Bad Request: /api/instances/email-credentials-check/
yes the only thing i changed was, that i use my real email as a sender instead of an alias but this shouldnt make a difference
Fragly
Fragly•6mo ago
Well if that's the only difference between my working setup and your not working setup then maybe it does make difference could you try making the Sender Email the alias email you added to your gmail account? if that doesn't work then i'm out of ideas 🤣
Baldbytes
BaldbytesOP•6mo ago
that does only work if i have another email, which i dont have
Fragly
Fragly•6mo ago
for this to work you require 2 email adresses 1. a base gmail adress 2. an alias email that you've added to your base gmail adress you then need to set your username to your base gmail adress set the password to the same app password you used to configure the alias email address set the port to the same port you configured on your alias email address and finally use the alias email as the sender email (I think)
Baldbytes
BaldbytesOP•6mo ago
the second step is the problem, i can add an alias but this email have to exist lol
Fragly
Fragly•6mo ago
oh 🤣
Baldbytes
BaldbytesOP•6mo ago
so, not really an alias in my eyes
Fragly
Fragly•6mo ago
well i've never tried sending emails via a base gmail address before so idrk how to do that
Baldbytes
BaldbytesOP•6mo ago
i also added as alias my other email, but still, failed to send
Fragly
Fragly•6mo ago
was [email protected] just a placeholder then?
Baldbytes
BaldbytesOP•6mo ago
Nope
Baldbytes
BaldbytesOP•6mo ago
this also did work
No description
Baldbytes
BaldbytesOP•6mo ago
but cant change a port or something. so fed up with this google shit
Fragly
Fragly•6mo ago
I am not really sure how it is possible to configure that without specifying a port Honestly it might just be better using a dedicated smtp server gmail smtp is known to be unreliable on Railway If you really need to use a gmail smtp server then I recommend looking up a tutorial for how to set up an alias email on gmail properly (note: most if not all of them are a bit outdated, app passwords are what you use for the password now and not what they say in the video)
Want results from more Discord servers?
Add your server