不在suitecript 2.0中发送电子邮件

时间:2017-07-21 04:44:51

标签: netsuite suitescript

由于某些原因,我似乎无法收到来自我的suitecript的电子邮件。

这是我的代码。

 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服务器错误日志没有错误。

这可能是什么问题?感谢

1 个答案:

答案 0 :(得分:2)

您使用沙盒帐户,只能将Sandbox电子邮件发送给测试脚本的用户。

相关问题