theponline Posted January 7, 2011 Share Posted January 7, 2011 Hey all,I am looking for a way to get a BCC of the "order_conf" e-mail.Customers receive the mail perfectly, but it would be nice if I - as an owner of the shop - would get a BCC of that mail as well.The module "mail alerts" does NOT work somehow, even worse: if that module is enabled even my customers don't receive an e-mail.I red all the topics on prestashop.com about this issue and I found no solution.After searching in the code, I see that the order_conf-mail is being send from the "PaymentModule.php"-file.The commando there is as following: if ($orderStatus->send_email AND Validate::isEmail($customer->email)) Mail::Send(intval($order->id_lang), 'order_conf', 'Order confirmation', $data, $customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, $fileAttachment); What I would like now, is add my address to this command as well. Does anybody know how that works?Thanks! Link to comment Share on other sites More sharing options...
tomerg3 Posted January 7, 2011 Share Posted January 7, 2011 There is no option for a BCC in the Mail::Send() function.You can just copy the send command and change $customer->email to the admin email, it will send you the same email.You can also try to see what's wrong with the mailalert as it should be working. Link to comment Share on other sites More sharing options...
Simon-AV Posted February 23, 2011 Share Posted February 23, 2011 Hi Tomerg3Is there any chance you could please give an example of how it should look once the codes edited? I'm new to editing and am not sure exactly what needs copying and editing.I'm needing to acheive a BCC on my confirmation emails, will this give pretty much the same effect? Will the customer see the alternate address? Link to comment Share on other sites More sharing options...
tomerg3 Posted February 23, 2011 Share Posted February 23, 2011 Change $send = $swift->send($message, $to, new Swift_Address($from, $fromName)); To $send = $swift->send($message, $to, new Swift_Address($from, $fromName)); $send = $swift->send($message, "your email", new Swift_Address($from, $fromName)); Link to comment Share on other sites More sharing options...
theponline Posted February 23, 2011 Author Share Posted February 23, 2011 Instead of receiving all mails, we decided only to receive the order-confirmations.In that case you should edit "PaymentModule.php" (presta 1.3.3 around line 395).Search for: if ($orderStatus->send_email AND Validate::isEmail($customer->email)) Mail::Send(intval($order->id_lang), 'order_conf', 'Order confirmation', $data, $customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, $fileAttachment); and change this to: if ($orderStatus->send_email AND Validate::isEmail($customer->email)) Mail::Send(intval($order->id_lang), 'order_conf', 'Order confirmation', $data, $customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, $fileAttachment); Mail::Send(intval($order->id_lang), 'order_conf', Orderconfirmation.' '.$order->id, $data, "[email protected]", $customer->firstname.' '.$customer->lastname, NULL, NULL, $fileAttachment); That way YOU will receive the exact same e-mail as your customer, the only thing I changed is adding a order-number to the subject :-) 1 Link to comment Share on other sites More sharing options...
Recommended Posts