Closed tbalouet closed 7 years ago
Where are you trying to use this from? home or work ?
I've got the same here for me. I think the majority of companies have a kind of "white list" of IPs, to prevent DDOS. If you're trying it from your computer, chances are that your IP is not in that list.
Just try it on a VPS you rent anywhere, it should work (well it did for me!)
I was trying this from work. But actually after trying this in production mode on an Ubuntu server, it seems to be working. Maybe it is a Windows related problem?
I've had the same sort of problem, but it was resolved the moment I send a mail from the domain the app was installed on. E.g. I have a Digital Ocean droplet with the domain geex.company on it and mails are sent without any problem, but the moment I try to send a mail from a domain that is not pointed by DNS to that VPS, like "outlook.com", it gets blocked by gmail servers and other services list it as "spam".
While testing the script at home I ran into the same problem, this was because my ISP blocks port 25 by default.
Would be nice if the port can also be manually set, like the devPort.
@skerit drop a PR and ill be sure to look at it. If not ill just be sure to write it down and take it into account later
From Comcast docs on port 25: "Comcast recommends the use of the industry-recommended port 587 with TLS/SSL enabled...".
Help me understand how node-sendmail works. Is the computer running this module connecting directly to the MX servers of every email recipient? If so, I think some hosting companies like 1and1 that open SMTP ports only to its own network will prevent this from working. Also, SPF would likely fail during development time when I am running off my PC connecting from anywhere.
I am using node mailer with SendGrid
"nodemailer": "^2.7.0",
"nodemailer-smtp-transport": "^2.7.2",
I was stuck not being able to send out to port 25 locally. SendGrid allows port 2525 so I tried that and worked! Apparently, my ISP does not block port 2525 so I can do local development easily.
Expected Behavior
Using your package to send mails, the server was unable to send anything. Here's the server code I used:
And here's the console error I got:
Context
I'm trying to send a mail with informations received from a form
Your Environment
Windows 10 NodeJS v4.4.3