Code-based Actions: Send email to multiple recipients

Use cloud code to send email to multiple recipients.

Send email to 1 recipient

The following example shows you how to send an email to a single recipient:

async payload => {  
  // Send an email  
  toolbelt.email({  
    to: '[email protected]',  
    subject: 'Report needed',  
    message: 'If only you knew the power of the dark side.'  
  })  
}

Send email to multiple recipients

The following example allows you to send an email to multiple recipients by creating an array:

async payload => {  
  // Send an email  
  toolbelt.email({  
    to: ['[email protected]','[email protected]'],  
    subject: 'Report needed',  
    message: 'If only you knew the power of the dark side.'  
  })  
}