Net::OpenTimeout error while trying to send an email via Mailtrap
macciep
PROOP

4 months ago

Hello,

I am experiencing a persistent issue with outgoing SMTP connections from my Ruby on Rails service deployed on Railway.

The Problem: When attempting to send an email via Action Mailer to Mailtrap's SMTP server, the job consistently fails with a Net::OpenTimeout: execution expired error.

This indicates the application cannot establish a socket connection.

Configuration Context:

  • Local and Other Servers: Sending emails via SMTP to Mailtrap works perfectly when run locally and when deployed on other hosting providers.

  • Mailtrap Host/Port: I am configured to use live.smtp.mailtrap.io on port 587.

Question:

  1. Given the successful external testing, is this issue caused by outbound network rules or a firewall policy within the Railway service container that is blocking outbound traffic on port 587?

  2. Has anyone in the community encountered this specific Net::OpenTimeout issue on Railway when using an external SMTP provider, and if so, what was the resolution?

Solved

1 Replies

Railway
BOT

4 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 Awaiting User Response Railway 4 months ago


Status changed to Solved macciep 4 months ago


Loading...