Create emailbody in SuiteScript, after that add the emailbody in nlapiSendEmail(). This is the syntax ‘nlapiSendEmail ( from , to , subject , body , cc , bcc , records , files )’. After that send the mail, if mail is not received at recipient, we can set some permissions in user.
First take extension permission, from Web Site Hosting Files > Live Hosting Files > SSP Applications > NetSuite Inc. – SCA 2022.1.0 > Development > extensions After that check on ENABLED, select the user from EXECUTE AS ROLE, select the user role from ROLES and select DEPARTMENTS for our requirements.
When we set the extension permission goto Setup > Users/Roles > Manage Roles . Here we can give permission for user, so select our user and click edit button ,then we can see permission field at the bottom of the page and give permission as we required. If showing ‘Permission violation :you need the ‘Vicarious emails permission to access this page ‘ error in execution log ,then goto Setup > Users/Roles > Manage Roles->select the user from list ->permission->setup here we can add ‘Vicarious Email’ permission and set level to ‘FULL’.