3 months ago
Hello Railway support / community,
I’m seeing failures sending OTP emails from my app after migrating to the Hobby ($5) plan. This was working reliably under the free plan — the app’s SMTP configuration and credentials were not changed — but now the app fails to connect to the SMTP server and OTP emails are not delivered.
Error SMTP: [Error no 101] Network is unreachable
What I’m doing
Application: Python/Flask app sending OTPs with
smtplib(STARTTLS) tosmtp.gmail.com:587(Gmail SMTP).Configuration: same env vars as before (
SENDER_EMAIL,SENDER_PASSWORD,SMTP_SERVER=smtp.gmail.com,SMTP_PORT=587) — credentials are valid and use an app password for Gmail.Behavior:
On the previous free deployment this worked.
After upgrading to Hobby ($5), the app still runs, but every OTP send returns the
Network is unreachableerror from the server logs and the email is not delivered.I can confirm the application code path is reached — it attempts to open an SMTP connection and fails with the network error (so it’s not an authentication failure).
Why I think this is a network/egress issue
The error is a low-level socket error (
Network is unreachable), which usually indicates outbound TCP connections to that host/port are not possible from the runtime environment (blocked egress, routing issue, firewall, or networking misconfiguration), not an SMTP auth error.My SMTP settings/credentials were not changed — same config worked previously — so it’s unlikely to be a config bug on my side.
Thanks in advance — I rely on OTP emails for user access and this is blocking logins.
Best regards,
Jefferson
2 Replies
3 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
3 months ago
Hello,
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 documentation:
https://docs.railway.com/reference/outbound-networking
Best regards,
The Railway Team
Status changed to Solved brody • 3 months ago