Jump to content

CC emails sent to customers to Admin email address


JordanESSystems

Recommended Posts

Hello,

 

Is it possible to include admin email addresses in the recipient when the status of an order is changed. So when the customer gets an email saying their product is being 'shipped', the email is also sent to an admin email?

 

Does anyone know how to do this?

 

Thanks

Link to comment
Share on other sites

Hello, try this:

This sample was tested only on version 1.6.1

 

Open file /classes/order/OrderHistory.php

 

Find function: public function sendEmail()

 

At the end of code inside this function find this, near line 455:

if(!Mail::Send((int)$order->id_lang, $result['template'], $topic, $data, $result['email'], $result['firstname'].' '.$result['lastname'],
					null, null, $file_attachement, null, _PS_MAIL_DIR_, false, (int)$order->id_shop))
					return false;

And change it on this code:

 

$admin_email = '[email protected]';

if(!Mail::Send((int)$order->id_lang, $result['template'], $topic, $data, $result['email'], $result['firstname'].' '.$result['lastname'],
					null, null, $file_attachement, null, _PS_MAIL_DIR_, false, (int)$order->id_shop))
					return false;

if(!Mail::Send((int)$order->id_lang, $result['template'], $topic, $data, $admin_email, $result['firstname'].' '.$result['lastname'],
					null, null, $file_attachement, null, _PS_MAIL_DIR_, false, (int)$order->id_shop))
					return false;

Warning, admin email address ( $admin_email = '[email protected]' ) should not coincide with store email address (that one you write on shop contacts page inside BO), from that email address on shop contact page emails sends to clients and managers, and if sender and receiver got same email address, you will get mail send error.

Link to comment
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
×
×
  • Create New...