跳到主要内容
CNode

nodemailer 直接发送邮件的问题

社区
Wwxdwfc发布于 13 年前
032680

我按照nodemailer github上的介绍这段代码 var transport = nodemailer.createTransport();

transport.sendMail(messageOptions, function(error, response){ if(error){ console.log(error); return; }

// response.statusHandler only applies to 'direct' transport
response.statusHandler.once("failed", function(data){
    console.log(
      "Permanently failed delivering message to %s with the following response: %s", 
      data.domain, data.response);
});

response.statusHandler.once("requeue", function(data){
    console.log("Temporarily failed delivering message to %s", data.domain);
});

response.statusHandler.once("sent", function(data){
    console.log("Message was accepted by %s", data.domain);
});

}); 然后直接报response没有statusHandler这个错,然后这是为什么?因为我想用nodemailer做一个验证 邮件的功能,但可能用户输入非法的地址时他会一直retry,所以我不想让他retry,那具体该怎么做呢,,谢谢。

查看回复

回复 (0)

暂无回复,成为第一个参与讨论的人。

参与回复

登录后即可参与回复。登录