3 months ago
Just today I started getting timeout errors when sending emails with rails mailer: Net::OpenTimeout
This is my configuration and when I run it locally it works.
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
user_name: 'api',
password: ENV['MAILTRAP_PASSWORD'],
address: 'live.smtp.mailtrap.io',
host: 'live.smtp.mailtrap.io',
port: '2525',
authentication: :login,
enable_starttls_auto: true,
open_timeout: 15
}This is new as of the last few hours.
7 Replies
3 months ago
Hello,
Railway blocks outbound SMTP traffic. See https://docs.railway.com/reference/outbound-networking#email-delivery
Best,
Brody
Status changed to Awaiting User Response Railway • 3 months ago
3 months ago
Thanks Brody, this is new right?
Status changed to Awaiting Railway Response Railway • 3 months ago
3 months ago
Kind of. We have blocked outbound SMTP for the longest time, but just recently we discovered the rule was not applied to all hosts, so today we fixed that configuration mishap on our side.
Status changed to Awaiting User Response Railway • 3 months ago
3 months ago
I have 3 Ruby on Rails applications, 2 old ones and one I uploaded today. The new one is not sending emails via SMTP. Could this be the new rule? The other 2 apps are sending normally.
Status changed to Awaiting Railway Response Railway • 3 months ago
3 months ago
Railway has had a policy to block SMTP port 25 for years, but it was not enforced consistently across all hosts. Yesterday, we rolled out a change to the way we do firewalls, in which we blocked all SMTP ports (25, 465, 587, 2525).
As of right now, all Pro customers should be able to use SMTP.
Status changed to Awaiting User Response Railway • 3 months ago
christian
Railway has had a policy to block SMTP port 25 for years, but it was not enforced consistently across all hosts. Yesterday, we rolled out a change to the way we do firewalls, in which we blocked all SMTP ports (25, 465, 587, 2525).As of right now, all Pro customers should be able to use SMTP.
3 months ago
Does this mean APIs that include email services do not work on Railway? e.g Sending an email to a user's registered email when they need to reset their token. Coz that's what I'm experiencing on my API for the past 5 days or so.
Status changed to Awaiting Railway Response Railway • 3 months ago
3 months ago
Correct, if your on the Hobby plan (you are) and are trying to connect to an SMTP email service, it will not work.
Instead, please use a dedicated email service that provides HTTPS APIs. More information can be found in our documentation:
Status changed to Awaiting User Response Railway • 3 months ago
Status changed to Solved brody • 3 months ago