SMTP port 587 timeout from Railway container
hawksberginternational1
FREEOP

11 days ago

Hi Railway Support,

I am hosting a FastAPI backend on Railway.

SMTP emails are not working.

I tested the connectivity from the Railway Console.

  1. DNS resolution works:

python -c "import socket; print(socket.getaddrinfo('smtp.gmail.com',587))"

This returns Gmail IP addresses successfully.

  1. HTTP internet access works.

  2. But TCP connection to smtp.gmail.com:587 always times out.

Command:

python -c "import socket; s=socket.socket(socket.AF_INET,socket.SOCK_STREAM); s.settimeout(10); s.connect(('142.250.4.108',587))"

Result:

TimeoutError: timed out

I also tested with two different Gmail accounts and different App Passwords.

Could you please verify whether outbound SMTP traffic on port 587 is blocked or restricted for my Railway service?

Project:

hawksberg-backend

Thank you.

Solved

1 Replies

Railway
BOT

11 days ago

Outbound SMTP is only available on the Pro plan and above, while Free, Trial, and Hobby plans have SMTP disabled. For sending emails from your application, please use a dedicated email service that provides HTTPS APIs. More information can be found in our outbound networking documentation.


Status changed to Awaiting User Response Railway 11 days ago


Railway
BOT

4 days ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway 4 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...