I am unable to send emails from external url version of a suitelet. Everything works fine for internal url, but whenever I use external url no email gets delivered. There is no error, and code after sending email is executed correctly. I tried this on both Production and Sandbox accounts, I execute it as Admin. Is email.send restricted for external url's ? Is there any workaround this? I am new to NetSuite.
var currentuser = 1111;
var recipient = 'some.email@email.com';
var subject = 'subject';
var EmailBody = '<p> email content </p>';
email.send({
author: currentuser,
recipients: recipient,
subject: subject,
body: EmailBody,
});