Issue with SMTP connection on Railway (Error 500)
leonardoortizbr
HOBBYOP

3 months ago

Hello,

I am trying to send emails from my FastAPI application using Gmail SMTP:

s = smtplib.SMTP('smtp.gmail.com', 587)
s.starttls()
s.login(user, password)

When running the code locally (offline), the email sending works correctly. However, when running the same code online, hosted on Railway, I get the following error:

500 Internal Server Error
Internal server error: [Errno 101] Network is unreachable

Until a few days ago (I cannot specify exactly when), this was working normally with the exact same code on Railway.

Could you please confirm if outbound SMTP connections (e.g., to smtp.gmail.com:587) are now blocked on Railway, and if so, what alternatives you recommend for sending emails from applications hosted on your platform?

Thank you.

Solved

2 Replies

brody
EMPLOYEE

3 months ago

Hello,

Outbound SMTP is blocked.

We recommend using email providers that have HTTPS APIs such as resend.


leonardoortizbr
HOBBYOP

3 months ago

Thank you for the clarification.

Do you have any estimate if outbound SMTP will be allowed again in the future, or will it remain permanently blocked on Railway?

Best regards,


brody
EMPLOYEE

3 months ago

We are looking into allowing it for Pro and above only.


boleta-do
PRO

3 months ago

brody you freaking suck. I'm paying 20$+ dollars a month for a service that gets downed with a free stresser + no smtp??? im unsubscribing next month if you guys dont do anything lol


boleta-do

brody you freaking suck. I'm paying 20$+ dollars a month for a service that gets downed with a free stresser + no smtp??? im unsubscribing next month if you guys dont do anything lol

medim
MODERATOR

3 months ago

Please be respectful of team members.

If you have an issue with Railway, please open your own support ticket. Regarding SMTP, as stated in the documentation, SMTP traffic is blocked on Railway.


Status changed to Solved brody 3 months ago


Loading...