【发布时间】:2016-10-17 16:16:54
【问题描述】:
我正在使用 sendgrid 发送电子邮件。但是当我尝试如下创建电子邮件对象时
let email = new sendgrid.Email();
email.addTo("rhushikeshl@test.com");
email.setFrom("customercare@test.com");
email.setSubject("New Unit Added");
email.setHtml("New unit addded </br> Unit Id =" + savedUnit._id);
sendgrid.send(email, function(err, json) {
if (err) {
console.log("Error: " + err);
} else {
console.log(json);
}
});
但它给出了错误
https://sendgrid.com/docs/Integrate/Code_Examples/v2_Mail/nodejs.html
【问题讨论】: