RE: email.sendBulk “SSS_INVALID_TO_EMAIL” error

I have a function that contains the following:

function sendEmails(ids) {

var fileObj = file.load({
id: ‘************’

var fileContent = fileObj.getContents();
log.debug(’email address to send: ‘, ids);
try {
author: ‘**’,
body: fileContent,
recipients: ids,
subject: ************* Price Adjustments’
log.debug(’email sent: ‘, ’email sent’);
} catch (e) {
log.debug(’email send bulk exception: ‘, JSON.stringify(e));

I starred out certain things for privacy reasons. The ids argument is in correct format; it gives back an array of email addresses. I’m currently testing with my email address and I’m still getting this error in the catch statement:

   type: "error.SuiteScriptError",
   message: "One or more recipient emails are not valid."

How do I test this out so it sends emails to me 
rather than throwing this error? 
cd_7725 Rookie Asked on January 19, 2022 in SuiteScript.
Add Comment
2 Answers


When you say testing with your email address, id “ids” number[] or string[]?



Intermediate Answered on January 21, 2022.


on January 21, 2022.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.