I am using nodemailer 0.7.1 and I can sent emails on my localhost. But when I use it with AWS Server, didn't get any such mail. Please help me.
var smtpTransport = mailer.createTransport("SMTP",{
service: "Gmail",
auth: {
user: "from@gmail.com",
pass: "********"
}
});
var mail = {
from : "from@gmail.com",
to : "to@gmail.com",
subject : "dummy subject",
html : "dummy message"
}
smtpTransport.sendMail(mail, function(error, response){
if(error){
console.log(error+"console error");
smtpTransport.close();
} else{
logger.info("Mail sent: " + response.message);
smtpTransport.close();
}
http://www.overtakenbyevents.com/sending-emails-from-openshift-apps/
RépondreSupprimer