Claudia M

BCC Customer emails to Admin not working

Recommended Posts

Claudia M    2

 

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���j���bwzg������ޕ���ڙ޶��j���k��+(��޶��~)^��������

(There’s more but I can’t copy it)

Share this post


Link to post
Share on other sites

bsmither    1,212

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now