Claudia M Posted August 11, 2017 Share Posted August 11, 2017 This is what I did to receive copy of eMails sent to the customer but it isn’t working. See below. Any suggestions? In admin, Manage Hooks, Code Snippets tab, click Add Snippet. Create 1st Code Snippet Enabled: Checked Unique ID: classize_mailer@cubecart Execution Order: 99 Description: Class-izes the Mailer instantiation so that it can be seen outside the orderStatus() method. Trigger: class.order.order_status Version: 1.0 Author: https://forums.cubecart.com/topic/52330-how-to-add-admin-as-bcc-of-all-customers-order-status-emails/ PHP Code: <?php $this->_mailer =& $mailer; Save. Create 2nd Code Snippet. Enabled: Checked Unique ID: bcc_admin@cubecart Execution Order: 99 Description: BCC's the admins on all customer emails. Trigger: class.order.assign_order_details Version: 1.0 Author: https://forums.cubecart.com/topic/52330-how-to-add-admin-as-bcc-of-all-customers-order-status-emails/ PHP Code: <?php //$this->_mailer->SMTPDebug = 2; //$this->_mailer->Debugoutput = 'error_log'; $addBCC_notify_admins = explode(',', $this->_notifyAdmins()); foreach ($addBCC_notify_admins as $admin) { $this->_mailer->addBCC($admin); } Save. In /includes/extra I get these 3 snippet files. snippet_3afa312cdc3acf2182d2144a8cfac7be.php Contents: <?php //$this->_mailer->SMTPDebug = 2; //$this->_mailer->Debugoutput = 'error_log'; $addBCC_notify_admins = explode(',', $this->_notifyAdmins()); foreach ($addBCC_notify_admins as $admin) { $this->_mailer->addBCC($admin); } snippet_5c6632328d5bb207a40e3ef624488c36.php Contents: <?php $this->_mailer =& $mailer; Then I get this: snippet_cc06e51b963dba490472fc2e1a78f5d8.php Contents: �kz۫���zv�zƫ���j���b�w�zg������ޕ鞞���ڙ���j���k��+(����~)^�������� (There’s more but I can’t copy it) Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 11, 2017 Share Posted August 11, 2017 The third one belongs to some other function. In admin, Manage Hooks, Code Snippets tab, take note of all the enabled snippets. It could be that the third one did not get encoded properly. Click the edit icon and determine what this is suppose to do. Quote Link to comment Share on other sites More sharing options...
Claudia M Posted August 11, 2017 Author Share Posted August 11, 2017 I found and deleted it. Do you have any idea why the emails aren't sending to me? Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 11, 2017 Share Posted August 11, 2017 We need to add some diagnostic code. We should take this to email. Send me a PM. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.