nodemailer nodejs:sendmail退出127
我想从我的服务器(kimsufi)发送电子邮件,以确认注册。
所以,我使用nodemailer https://github.com/andris9/Nodemailer
我有这个错误:
Error occured Sendmail exited with 127
什么意思 ?
谢谢 !
如果你使用这个例子https://github.com/andris9/Nodemailer/blob/master/examples/example_sendmail.js
然后replace这个代码
var transport = nodemailer.createTransport(“Sendmail”,“/ usr / sbin / sendmail”);
同
var transport = nodemailer.createTransport("SMTP", { host: "smtp.gmail.com", // hostname secureConnection: true, // use SSL port: 465, // port for secure SMTP auth: { user: "foo@rcorp.co.in", pass: "fooP@ssword" } });
确保你的sendmailpath是正确的。 要检查,打开一个terminal并发出:
which sendmail