Hacker News new | ask | show | jobs
by whileonebegin 4468 days ago
Is this really much easier than using https://www.npmjs.org/package/mailer? Also, unless nodemailer is written by the same developer as mailer, it appears they copied the tagline, "simple as cake".

        email.send({
            host : "smtp.gmail.com",              // smtp server hostname
            port : "465",                     // smtp server port
            ssl: true,
            domain : "localhost",            // domain used by client to identify itself to server
            to : "recipient@somewhere.com",
            from : 'sender@somewhere.com',
            subject : 'My Subject',
            body: 'Blah\nBlah\nBlah.,
            authentication : "login",        // auth login is supported; anything else is no auth
            username : '',
            password : ''
        },
        function (err, result) {
        });
1 comments

"mailer" and its derivatives are deprecated in favor of "nodemailer". Besides, "mailer" uses "nodemailer" as its backend (it used to have its own SMTP client but it had a lot of shortcomings), so it doesn't really count. You could as well create your own wrapper areound "nodemailer" that would be even easier to use.