0

I got the following two pieces of code:

$bccEmail = $this->scopeConfig->getValue('trans_email/ident_general/email');

->addBcc($bccEmail)

The meaning is to send a bcc to the email that is stored on 'Send Order Copy To: ' in Stores -> Configuration -> Sales -> Sales Emails -> Order -> Send Order Email Copy To:

Still I do not receive any bcc. What am I doing wrong?

Julian Murillo
  • 601
  • 1
  • 6
  • 25

1 Answers1

0

You have to change your $bccEmail to

$bccEmail = $this->scopeConfig->getValue('sales_email/order/copy_to', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
Piyush
  • 5,893
  • 9
  • 34
  • 64