Jump to content

BCC Customer emails to Admin not working


Claudia M

Recommended Posts

 

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)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...