1

I am using sendgrid v6.4.0, sending email using dynamic template to cc & bcc is ignored. Find the payload below -

{
  subject: 'Hello world',
  message: 'Hello plain world!',
  from: 'abcd@abcd.com',
  to: 'a@b.com',
  cc: 'b@b.com'
  bcc: 'c@b.com'
};

CC and BCC is ignored and only email received by a@b.com

Note: I found a similar question question but it was unanswered. sendgrid : add cc in email

Subhrajyoti Majumder
  • 40,646
  • 13
  • 77
  • 103

1 Answers1

2

For sending a single email to a single recipient with a cc and bcc

    const msg = {
      "personalizations": [
    {
      "to": [
        {
          "email": "a@b.com"
        }
      ],
      "cc": [
        {
          "email": "b@b.com"
        }
      ],
"bcc": [
            {
              "email": "c@b.com"
            }
          ]
        }
      ]
          from: 'abcd@abcd.com',
          subject: 'Hello World',
          text: 'Hello plain world',
        };
        
        sgMail.send(msg).then(() => {
          console.log('emails sent successfully!');
        }).catch(error => {
          console.log(error);
        });

For more info refer this

Sachin Yadav
  • 748
  • 9
  • 28