November 11, 2020

SuiteScript Example – Sending Email to Multiple Recipients

What good is an email you can only send to one person? How else would you catch people accidentally hitting “Reply All”? The N/email.send() method supports multiple recipients as well as CC and BCC functionality:

results in an email with a list of recipients:

Multiple recipients

The recipients property supports a single internal ID or a single email address string to send to one person, or an Array of those to send to multiple people. Here we have an Array containing two email addresses, thus our to line on the email will have these two recipient addresses.

CC and BCC

The send() method also provides the cc and bcc options to provide the corresponding functionality. These two properties behave identically to the recipients property in that they accept a single ID or address as well as an Array containing either or both.

cc: [17, “frodo@fly.fool”] will CC both frodo@fly.fool as well as the Entity record with internal ID 17.

Similarly, bcc: [“s@iseeyou.mordor”, 21, “notthegrey@eaglefriends.mid”] will BCC three different email addresses: s@iseeyou.mordor, notthegrey@eaglefriends.mid, and the Entity record with internal ID 21.

Recipient Limit

Note that the send() method is limited to a maximum of 10 recipients across all of recipients, cc, and bcc.

If you need to send emails to larger audiences, such as with Marketing Campaigns, there are other methods within N/email for that purpose. Researching them on your own is a useful exercise.

HTH

-EG

This is a complete chapter from the Sending Email with SuiteScript Cookbook.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Related posts

March 3, 2021

Does the physical location of a competent employee change the amount of value they can deliver for your organization? If it does, I’d be keen to hear your story. If it does not, why ...

Read More

March 2, 2021

Today a friend and former colleague of mine – who happens to now be in a development leadership role for a NetSuite partner – was lamenting the extreme difficulty of finding and hiring NetSuite ...

Read More

March 1, 2021

Software is never finished; clients are always changing and re-prioritizing. NetSuite is ever a moving target – always updating and evolving. Market forces are always shifting and shoving, forcing new demands on your business. ...

Read More