When enabling the checkbox "Send a copy of the receipt to this email:" and entering an email-address in an order type, the email-notification will only be sent to the customer. It will not additionally be sent via cc to the address being placed into the cc-field (like being expected).

Comments

Mediengenosse created an issue. See original summary.

agoradesign’s picture

To be precise, it should be send as Bcc. The code looks correct at: http://cgit.drupalcode.org/commerce/tree/modules/order/src/EventSubscrib... (lines 115-117)

You should debug into that lines and have a look, if the header is really not set

mglaman’s picture

Status: Active » Postponed (maintainer needs more info)

Can you please follow up to #2? We have the following test which asserts the Bcc field is populated

  /**
   * Tests the BCC functionality.
   */
  public function testOrderReceiptBcc() {
    $order_type = OrderType::load('default');
    $order_type->setReceiptBcc('bcc@example.com');
    $order_type->save();

    $transition = $this->order->getState()->getTransitions();
    $this->order->getState()->applyTransition($transition['place']);
    $this->order->save();

    $mails = $this->getMails();
    $this->assertEquals(1, count($mails));

    $the_email = reset($mails);
    $this->assertEquals('bcc@example.com', $the_email['headers']['Bcc']);
  }
mediengenosse’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Sorry! BCC not being sent due to a misconfiguration of Mailserver. It was our fault! Works as designed.

hockey2112’s picture

Status: Closed (works as designed) » Active

@Mediengenosse, what was your fix? Mine is not sending a copy to that email address from the settings, either.

phandolin’s picture

@hockey2112 I second that. I'm not having any luck sending copies of receipts either.

init90’s picture

Status: Active » Closed (works as designed)

I also encountered such problem, in my case, it was "Swift Mailer" problem. Here is the solution: #2892104: Add support for CC and BCC headers it's wrong conclusion, please ignore it