Custom Module: emailHandler.js

          /**
* @NApiVersion 2.x
* emailHandler.js
*/
define(['N/email'], function(email){
    function sendSingleEmail(data){
        return email.send(data);
    }
                
    function sendBulkEmail(data){
        throw {name: "NotImplementedError", message: "Bulk email not implemented!"};
    }
                
    return{
        sendSingleEmail : sendSingleEmail,
        sendBulkEmail : sendBulkEmail
    };
}); 

        

Related Topics

Entry Point: emailSender.ssp
Service: emailService.ss
Sample SSP Application Code (SuiteScript 2.0)
SuiteScript 2.0 SSP Applications
Create and Use SSP Applications

General Notices