【发布时间】:2017-07-21 04:44:51
【问题描述】:
由于某些原因,我似乎无法从我的套件脚本中收到电子邮件。
这是我的代码。
define(["N/email"], function(email) {
function afterSubmit(scriptContext) {
var newOrder = scriptContext.newRecord.id;
email.send({
author: 17874,
recipients: "sam172@gmail.com",
subject: "mail from netsuite",
body: "test body email order id: " + newOrder
});
}
return {
afterSubmit: afterSubmit
};
});
此电子邮件将在创建销售订单时发送。 我的订单是通过 Webservice API 发送的,每次向 Netsuite 发送订单时,它都会触发此脚本,以便在创建销售订单时向我发送电子邮件。
我一直在通过多次下订单进行测试,但从未收到任何电子邮件。 netsuite 服务器错误日志上没有错误。
这可能是什么问题?谢谢
【问题讨论】:
-
您在沙盒中吗?请记住,沙盒电子邮件只能发送给测试脚本的用户。
-
是的,我在沙盒中。我不知道。谢谢@AdolfoGarza
-
电子邮件现在正在工作,我只是设置自己,我是在沙盒上测试脚本的人。再次感谢。
标签: netsuite suitescript