简体   繁体   中英

Cannot send mails for gmail address from nodejs nodemailer using port 25 on AWS EC2 instance

I Can send mails for dummy mail servers. but I cannot send mails to Gmail addresses using port 25. If I use 587 or 465 I'm getting a time-out error.

Also, just to add to this.. AWS actually blocks port 25 in most cases. You need to open a support email with AWS to have them lift this restriction.

There are two possible reasons why this may be happening:

  1. You have port 25 or 586, 465 disabled in the outbound rules for the instance's security group.
  2. There might be an issue in your code, maybe try putting your code here as well, we'll be happy to help

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM