im trying to send email through scheduled script using 2.0 but no email is being send, there is no error message or any indication of email being bounced back.
/** * @NApiVersion 2.x * @NScriptType ScheduledScript * @NModuleScope SameAccount */ define([''N/email', 'N/file', 'N/record'], /** * @param {email} email * @param {file} file * @param {record} record */ function( email, file, record ) { /** * Definition of the Scheduled script trigger point. * * @param {Object} scriptContext * @param {string} scriptContext.type - The context in which the script is executed. It is one of the values from the scriptContext.InvocationType enum. * @Since 2015.2 */ function execute(scriptContext) { var userId = /* Employee ID */; var toEmail = ["sample@test.com" , "sample2@test.com"]; email.send({ author: userId, recipients: toEmail, subject: 'Test Sample Email Module', body: 'email body', }); } return { execute: execute }; }); Im not reciving any email when i run this scheduled script.Ive tried to send email with same setting on the nlapiSendEmail() as script 1.0 and i am getting the email with no problem...am i missing something..?