doudoujack Posted September 27, 2015 Share Posted September 27, 2015 (edited) Hello, I had a shop running on 1.6.0.14 and did nothing to have bcc for ALL mails that were sent out from my shop. I'm building an other shop on 1.6.1.1 and I'm trying to do the same, because I'm not receiving the mails in BCC. Can you help me ? Tried some different combinations with addBcc in Mail.php but without result and I really don't know if I'm doing this right. Thanks ! Edited September 27, 2015 by doudoujack (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted September 27, 2015 Share Posted September 27, 2015 What I would do is edit or override the Mail class Send function. Add the following as the first line of that function, and that will ensure that all emails sent from Prestashop will include your on bcc $bcc = '[email protected]'; 1 Link to comment Share on other sites More sharing options...
doudoujack Posted September 27, 2015 Author Share Posted September 27, 2015 Many Thanks ! I didn't tried there. WORKS So the solution is in this code (line 87) in Classes/Mail.php : public static function Send($id_lang, $template, $subject, $template_vars, $to, $to_name = null, $from = null, $from_name = null, $file_attachment = null, $mode_smtp = null, $template_path = _PS_MAIL_DIR_, $die = false, $id_shop = null, $bcc = null, $reply_to = null) Just replace the $bcc = null with $bcc = '[email protected]' Again, many thanks ! Link to comment Share on other sites More sharing options...
bellini13 Posted September 28, 2015 Share Posted September 28, 2015 What you have done will work, but I will caution you that doing it this way you can encounter unexpected results. If the calling function decides to send a value for the bcc parameter, then your value will not be used. What you have done is created a default value if no value is passed. but if a value gets passed, then the passed value will be used Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now