2

I know there are many node.js modules to send emails from SMTP/gmail/hotmail/outlook etc, but I am stuck one step behind. I am coming from PHP land where you just use the mail class. What I never needed to ask myself was, where is this email coming from (the apache/etc server?) and why does Node need to send it through a 'provider' or sorts? I think I have no idea how email works.. I kind of dont like the fact that I need to go through another route first (what if they are down, what if I am building a node_module that I want to share and I don't know what kind of service the user is going to use.. etc)

Thanks for any clarification.

forty2011111
  • 115
  • 7
  • 1
    Take a look here, the very same question "coming from PHP land": http://stackoverflow.com/questions/14678447/is-there-a-nodejs-equivalent-to-phps-mail-function – bardzusny Feb 22 '15 at 23:37
  • 1
    As to how PHP does it - it simply uses system `sendmail` command, while node (in this case `nodemailer`) connects directly to specified SMTP server. – bardzusny Feb 22 '15 at 23:44
  • 1
    node.js brings a lot less with it than PHP, but offers a lot more options via NPM. it's made to run in places where sendmail might not be installed. try sending a gmail from php without messing around deep in your gmail settings... – dandavis Feb 22 '15 at 23:45
  • Thanks. Where exactly is sendmail coming from? Windows? Apache? – forty2011111 Feb 23 '15 at 00:27

0 Answers0