a month ago
Hi, I have verified white listing and firewall for IP's with service provider and email is working fine,, however the OTP doesn't send as it seems connection doesn't reach Railway, even though we are using SMTPS. Can you confirm the specific address or are we missing something?
mail-client.ts
function smtpFromEnv() {
const smtpHost = process.env.SMTP_HOST?.trim() ?? "";
const smtpPort = Number(process.env.SMTP_PORT) || (smtpHost ? 465 : 587);
// ...
const smtpSecure = envFlag(process.env.SMTP_SECURE) || smtpPort === 465;
smtp-send.ts
const sock = secure ? tls.connect({ host, port, servername: host }) : net.connect({ host, port });
1 Replies
Status changed to Awaiting Railway Response Railway • about 1 month ago
a month ago
This isn't a whitelisting problem, so there's no address to add. Outbound SMTP is blocked on the Hobby plan, which is why your connections to your mail server on ports 465 and 587 time out. They're dropped before they leave Railway, so your provider never sees them.
Two ways forward: upgrade to Pro and then redeploy the service (SMTP only unblocks after a fresh deploy), or stay on Hobby and send mail through an HTTPS email API like Resend or SendGrid. More detail here: https://docs.railway.com/reference/outbound-networking
Status changed to Awaiting User Response dizzydes90 • about 1 month ago
a month 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 • about 1 month ago