【发布时间】:2018-09-24 04:15:39
【问题描述】:
我有一个使用 nodemailer 模块发送电子邮件的 nodejs 代码。电子邮件发送成功,但回调函数从未执行。所以我无法通知用户是否发送了电子邮件。有人可以帮忙吗?
var mailOptions = {
from: emailFrom,
to: emailTo,
subject: subject,
html: content,
attachments: attachments,
}
transport.sendMail(mailOptions, (error, info) => {
if (error) {
console.log("Error in sending mail");
}
console.log("Success");
});
【问题讨论】:
标签: javascript node.js callback nodemailer