RE: email.send() throws UNEXPECTED_ERROR in Release Preview Account
Hi everyone , I have encountered this error
{"type":"error.SuiteScriptError","name":"UNEXPECTED_ERROR","message":null,"stack":["doSendEmail(N/email)","sendMail(/SuiteScripts/Webhive/ma_test_email.js:279)","takeAction(/SuiteScripts/Webhive/ma_test_email.js:61)"],"cause":{"type":"internal error","code":"UNEXPECTED_ERROR","details":null,"userEvent":"aftersubmit","stackTrace":["doSendEmail(N/email)","sendMail(/SuiteScripts/Webhive/ma_test_email.js:279)","takeAction(/SuiteScripts/Webhive/ma_test_email.js:61)"],"notifyOff":false},"id":"73e7f964-e577-4ddb-bf47-e2ff1eb58a3c-2d323032302e30392e3135","notifyOff":false,"userFacing":false}
on
email.send({
author: mailAuthor,
recipients: mailRecipient,
subject: template.subject,
body: template.body
});
in Release Preview Account. None of arguments ( mailAuthor,mailRecepient,template.subject, template.body ) are EMPTY.
The same code is running perfectly fine in SANDBOX and PRODUCTION Environment , It only throws error in RELEASE PREVIEW. Does anyone has any idea about this . Any help would be appreciated. Thanks
Sending frequent emails from RP or sandbox account is not allowed. If emails are not send please check communication subtab you will have sent email but not received by recipient.