Cant get Gmail working in the Plane Template
muffintecdip
PROOP

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 request

which seems weird to me because every other api is working correctly.

49 Replies

muffintecdip
PROOP

2 years ago

1c60876b-829c-413a-9391-fb43dc9fb231


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


muffintecdip
PROOP

2 years ago

ok let me try that


muffintecdip
PROOP

2 years ago

@Fragly did you set it up like this?

1251894283263410200


2 years ago

Yea, that seems about right


muffintecdip
PROOP

2 years ago

still failed to send the email


2 years ago

did you specify your username and password at the bottom?


muffintecdip
PROOP

2 years ago

but my instance is also still running on the railway url: "https://plane-production-6632.up.railway.app/god-mode/email/"


muffintecdip
PROOP

2 years ago

nope


2 years ago

I'm pretty sure that is required for any gmail smtp


2 years ago

here's my setup

1251894690291388400


2 years ago

( slightly older version of plane )


muffintecdip
PROOP

2 years ago

how did you setup the gmail for this? is this just your email with the sso password?


muffintecdip
PROOP

2 years ago

i did read that the sso password differs from the email password


2 years ago

In my gmail settings I set up custom emails here:

1251896192762380500


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 )


muffintecdip
PROOP

2 years 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


2 years ago

Google Account -> Security -> 2-Step Verification -> App Passwords


muffintecdip
PROOP

2 years ago

thanks


2 years ago

no problem!


muffintecdip
PROOP

2 years ago

Still no success with the app password

1251899391514509300


muffintecdip
PROOP

2 years ago

its so weird that i cant even see the reason for it


2 years ago

try turning email security off


muffintecdip
PROOP

2 years ago

1251899586768015400


muffintecdip
PROOP

2 years ago

Plane hates me, the only reason i can think off 😄


2 years ago

<:PepeThink:585531518701797401>


muffintecdip
PROOP

2 years ago

and i cant even see any error message in the api container


2 years ago

and you did add the email to your Gmail settings, right?


muffintecdip
PROOP

2 years ago

WARNING 2024-06-16 13:44:01,178 log 14 139781915061048 Bad Request: /api/instances/email-credentials-check/

yes


muffintecdip
PROOP

2 years ago

the only thing i changed was, that i use my real email as a sender instead of an alias


muffintecdip
PROOP

2 years ago

but this shouldnt make a difference


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 🤣


muffintecdip
PROOP

2 years ago

that does only work if i have another email, which i dont have


2 years 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)


muffintecdip
PROOP

2 years ago

the second step is the problem, i can add an alias but this email have to exist lol


2 years ago

oh 🤣


muffintecdip
PROOP

2 years ago

so, not really an alias in my eyes


2 years ago

well i've never tried sending emails via a base gmail address before so idrk how to do that


muffintecdip
PROOP

2 years ago

i also added as alias my other email, but still, failed to send


2 years ago

was hi@tecdip.com just a placeholder then?


muffintecdip
PROOP

2 years ago

Nope


muffintecdip
PROOP

2 years ago

this also did work

1251902768403189800


muffintecdip
PROOP

2 years ago

but cant change a port or something.


muffintecdip
PROOP

2 years ago

so fed up with this google shit


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


Loading...