The email address fields (to
, from
, cc
, bcc
, replyTo
) are flexible and can be any of the following:
const msg = {
//Simple email address string
to: '[email protected]',
//Email address with name
to: 'Some One <[email protected]>',
//Object with name/email
to: {
name: 'Some One',
email: '[email protected]',
},
//Arrays are supported for to, cc and bcc
to: [
'[email protected]',
'Some One <[email protected]>',
{
name: 'Some One',
email: '[email protected]',
},
],
};