SMTP Outbound Traffic Blocked on Railway
marcosbflotti
HOBBYOP

a month ago

Overview

The Organiza-mais-backend application (Java/Spring Boot) is attempting to send emails through Hostinger's SMTP servers, but all connection attempts are timing out after 5 seconds.

The application starts successfully, the email dispatcher is triggered correctly, but the TCP connection to the SMTP server is never established.

Error Logs

SocketTimeoutException: Connect timed out

Couldn't connect to host, port: smtp.hostinger.com, 587

Couldn't connect to host, port: smtp.hostinger.com, 465

What Railway Appears to Be Blocking

Outbound SMTP traffic on standard SMTP ports:

Port 25 (SMTP)

Port 465 (SMTPS / Implicit SSL)

Port 587 (SMTP + STARTTLS)

Tests Performed

Attempt Result Evidence

Port 587 (STARTTLS) ❌ Timeout after 5s 15:37:07 and 15:37:12

Port 465 (Implicit SSL) ❌ Timeout after 5s 17:38:02 and 17:38:07

IPv6 Egress Enabled ❌ Timeout after 5s 17:43:00 and 17:43:05

All tests resulted in the same error:

Connect timed out

The socket connection attempt is initiated, waits for a response, receives none, and eventually expires.

What Has Been Ruled Out

This does not appear to be an issue with:

Authentication

SMTP credentials are never validated because the connection is not established.

DNS Resolution

DNS is resolving correctly. Otherwise, the application would throw an exception such as:

UnknownHostException

Java / Spring Mail Configuration

The behavior is identical across different SMTP ports and configurations, indicating the application is functioning as expected.

Hostinger SMTP Configuration

No SMTP handshake is ever reached. The connection fails before any communication with the mail server occurs.

Conclusion

The evidence strongly suggests that outbound SMTP traffic is being blocked by Railway's network infrastructure in the US-West (sfo) deployment region.

This is an infrastructure-level networking limitation rather than an application bug or configuration issue.

Because connection attempts to both SMTP ports (587 and 465) consistently time out, and enabling IPv6 egress produced no change, the issue appears to be external to the application itself.

Solved

1 Replies

Railway
BOT

a month 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 26 days ago


Railway
BOT

19 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 19 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...