Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 595 Bytes

flexible-address-fields.md

File metadata and controls

29 lines (24 loc) · 595 Bytes

Flexible email address fields

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]',
    },
  ],
};