6 months ago
We've got the NestJS MailerModule setup and working with SendGrid in the transporter. It's been actively in use for about a year. No issues.
import { MailerModule } from '@nestjs-modules/mailer';Just this past week, we've noticed that we have issues with the mailer working inconsistently. We went through a series of debugging steps, including creating new API Keys with SendGrid.
We have tested the API locally, and it works as expected. The emails are sent through SendGrid.
[Nest] 26738 - 09/09/2025, 10:23:42 PM LOG [NestApplication] Nest application successfully started +3ms
[Nest] 26738 - 09/09/2025, 10:24:04 PM DEBUG [Logger-AuthService-generateTokenPasswordReset]: Password reset token generated successfully
[Nest] 26738 - 09/09/2025, 10:24:06 PM DEBUG [Logger-EmailService-emailPasswordResetInit]: Sent to [Redacted]
[Nest] 26738 - 09/09/2025, 10:24:06 PM DEBUG [Logger-AccountService-passwordForgot]: Password reset token generated and email sent for [Redacted]
[Nest] 26738 - 09/09/2025, 10:24:06 PM DEBUG [Logger] HTTP POST /v1/account/password-forgot Data: {"email":"[Redacted]"}Our currently deployed app, however, shows a different picture with no email being received. I don't have any additional info, and I don't even know how to begin debugging this any further than we already have.
[Nest] 15 - 09/10/2025, 2:21:31 AM LOG [NestApplication] Nest application successfully started +4ms
[Nest] 15 - 09/10/2025, 2:23:31 AM ERROR [MailerService] Error occurred while verifying the transporter}: Connection timeout
[Nest] 15 - 09/10/2025, 2:27:59 AM DEBUG [Logger-AuthService-generateTokenPasswordReset]: Password reset token generated successfullyProject ID: 7b51fc66-865a-4af1-b41d-bcc9f77cee30
Service: 8d8a4cfb-d517-4fe2-860e-b5134ffd9cf8
We have narrowed it down to something specific happening on Railway. Just not sure what it is.
10 Replies
6 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
That seems like a new change. Our apps have been sending emails for a couple of years using the NodeJS Email Transporter through SendGrid.
I upgraded my account, and I'm still experiencing the same problem. What gives @Railway ?
6 months ago
Did you redeploy your services?
6 months ago
after upgrading
6 months ago
Do it and let me know how it goes 🙂
6 months ago
Nice! I will mark this thread as solved
6 months ago
!s
Status changed to Solved medim • 6 months ago