1 Answer
- Newest
- Most votes
- Most comments
0
Hello.
Are you trying to send email using port 25?
AWS restricts port 25, so please apply to remove the restriction or use a mail sending port other than port 25.
https://repost.aws/knowledge-center/ec2-port-25-throttle
If the problem is not the port number, could you please provide the error log of the container application?
You may also want to consider sending emails using Amazon SES.
https://docs.aws.amazon.com/ses/latest/dg/send-email.html
Relevant content
asked 2 years ago
asked 4 years ago
asked 2 years ago
asked a year ago
- AWS OFFICIALUpdated 2 years ago

Thank you for your answer, I read posts you linked here, I understand that Port 25 no longer can be used . So, switched to SMTP ,
Here is my nodemailer settings:
See documentation for more information.
Host smtp.resend.com
Port 465 For encrypted/TLS connections use 2465, 487, 2587 and still getting errors, see bellow
`Here is my logs:
2025-02-08T18:40:32.605-06:00 Error: Connection timeout 2025-02-08T18:40:32.605-06:00 at SMTPConnection._formatError (/app/node_modules/nodemailer/lib/smtp-connection/index.js:809:19) 2025-02-08T18:40:32.605-06:00 at SMTPConnection._onError (/app/node_modules/nodemailer/lib/smtp-connection/index.js:795:20) 2025-02-08T18:40:32.605-06:00 at Timeout.<anonymous> (/app/node_modules/nodemailer/lib/smtp-connection/index.js:237:22) 2025-02-08T18:40:32.605-06:00 at listOnTimeout (node:internal/timers:581:17) 2025-02-08T18:40:32.605-06:00 at process.processTimers (node:internal/ti
And one more notes, I tested all ports on local and they works for sending emails, so there is something blocking on AWS
Is your AppRunner connected to a custom VPC? In that case, you will not be able to access external services from AppRunner unless you set up a NAT Gateway. https://aws.amazon.com/jp/blogs/containers/deep-dive-on-aws-app-runner-vpc-networking/