I am trying to use gmail smtp using node_mailer. I get the following error in nodejs logs (using nodester ). Here is my code:
var email = require('mailer');
email.send({
host : "smtp.gmail.com",
port : "465",
ssl : true,
domain : "domain.com",
to : "emailId@gmail.com",
from : "email@gmail.com",
subject : "You have been registered",
body: "<B>Hello! This is a test of the node_mailer.</B>",
authentication : "login",
username : ,
password :
},
function(err, result){
if(err){ self.now.error(err); console.log(err); return;}
else this.now.successfullySent(result);
});
I do not get stack errors, but email is not delivered.
@ work4liberty and @David Ellis. Thanks for your data, but it seems that the problem was not in my server code, I sent the wrong value to emailId from my client side javascript. Nodemailerhelped me debug the problem with the correct text by mistake.
source
share