I also tried using CC just in case the issue was with BCC and that didn't help.
This is the method I am using.
First I edited /system/library/mail.php
After public $parameter = ''; I added:
Code: Select all
protected $bcc;
Code: Select all
public function setBcc($bcc) {
$this->bcc = $bcc;
}
Code: Select all
if ($this->bcc) {
$header .= 'Bcc: ' . $this->bcc . $this->newline;
}
After $mail->setTo($order_info['email']); I added:
Code: Select all
$mail->setBcc('redacted_email_address');
I then refreshed modifications and cleared the VQMOD cache but when I send an email update, there is no BCC. I also tried it with CC and again it's not being done.
The email is being sent, but there is no BCC.
There is no error on screen when sending the email notification. I have checked /system/logs/error_log as well as the error_log file in the root and there's nothing showing there.
I wondered if maybe email was being sent by some other method, so in /library/mail.php I temporarily hard-coded my email address in public function setTo($to) and tested it, which generated an email to me. So it's definitely using that file, but it is ignoring CC and BCC.
I have tried this on my development server and also on my live server and neither is working.
I have successfully tested sending BCC email via a regular SMTP connection on the same server and just to be sure I sent an email via BCC using a Wordpress form on the same server. So I am pretty sure that the issue is Opencart and not the mail server.
As you can see if you've read this far, I have tried a lot of things before reaching out to the community for help!
Does anyone have any ideas?