Service crashing
Hi. I'm using nodemailer to send email. It works fine on localhost but when i deployed on Railway so it stop working? I still couldn't find out why. Does Railway block the port 465 & 587?
Solution:Jump to solution
that looks like you ran out of memory, the trial plan only has 512mb of ram, so upgrade to the dev plan for access to 8gb of memory!
33 Replies
Project ID:
N/A
N/A
well first, are there any error messages?
there are no error message
I'm gonna need error messages to help you debug this, if something is not working but there's no error messages, it means you aren't logging errors
do you mean this?
Solution
that looks like you ran out of memory, the trial plan only has 512mb of ram, so upgrade to the dev plan for access to 8gb of memory!
a service can only expose one port
I want to upgrade to the dev plan. But wonder that will it support nodemailer?
you can't run a mail server regardless of the plan, but you can definitely send mail with nodemailer
here is my email sending not sure why it is not sending email?
do you still see this when trying to send the email?
if you are still seeing those logs then this is still applicable
https://discord.com/channels/713503345364697088/1121328957170655323/1121338140976762940
no it is working but i got this
looks like you got your credentials wrong
are you storing the credentials in the railway service variables?
yes i store it in service variables
can I see a screenshot of the service variables please
okay and show me how you are using them in code?
it's store in my .env
and it works here
by this i'm creating an url to send verify link to customer
have you tried logging those two environment variables when in railway?
yes
and?
bruh
did you just send me your Gmail password
its just a test gmail
not really worry
it's an app password
well nodemailer said your credentials are incorrect
are you sure you are using nodemailer correctly
acctualy i tried to deployed on other platform and it's working
i'm not sure why in Railway not working
wait in this case i need to use gmail password or an app password?
I'm not sure
also Gmail itself could be blocking your login attempt, that's a possibility
whatever the issue, railway itself is not blocking you from sending emails, I promise you that much
ok let me find out the solution
sounds good!