2 years ago
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 requestwhich seems weird to me because every other api is working correctly.
49 Replies
2 years ago
GMAIL SMTP is somewhat unreliable on Railway
I've managed to get it working by using port 587 and turning TLS off
2 years ago
Yea, that seems about right
2 years ago
did you specify your username and password at the bottom?
but my instance is also still running on the railway url: "https://plane-production-6632.up.railway.app/god-mode/email/"
2 years ago
I'm pretty sure that is required for any gmail smtp
2 years ago
here's my setup

2 years ago
( slightly older version of plane )
how did you setup the gmail for this? is this just your email with the sso password?
2 years ago
In my gmail settings I set up custom emails here:

2 years ago
the username would then be the base gmail account's email and the send as would be the email you added here ^
2 years ago
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
2 years ago
( I think, I set these up a long time ago so I may be misremembering the exact details )
where can i find this app passwords? i did read this but i am unable to find the point where to setup this app
2 years ago
Google Account -> Security -> 2-Step Verification -> App Passwords
2 years ago
no problem!
2 years ago
try turning email security off
2 years ago
<:PepeThink:585531518701797401>
2 years ago
and you did add the email to your Gmail settings, right?
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
2 years 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 🤣
2 years ago
for this to work you require 2 email adresses
a base gmail adress
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)
the second step is the problem, i can add an alias but this email have to exist lol
2 years ago
oh 🤣
2 years ago
well i've never tried sending emails via a base gmail address before so idrk how to do that
2 years ago
was hi@tecdip.com just a placeholder then?
2 years ago
I am not really sure how it is possible to configure that without specifying a port
2 years ago
Honestly it might just be better using a dedicated smtp server
gmail smtp is known to be unreliable on Railway
2 years ago
If you really need to use a gmail smtp server then I recommend looking up a tutorial for how to set one up properly



