csimmons222 Posted July 15, 2016 Share Posted July 15, 2016 (edited) I have currently defined the SMTP information within the BO for outgoing email messages and it is working as intended. However, I want to BCC all outgoing email messages and I have having some problems doing so. I have gone into the mail.php file and added: 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) { /* Site Administrator added the following code to bcc all emails */ $bcc = '[email protected]'; /* End of Edit */ This does BCC all outgoing messages as I would like but it seems to cause all email messages to be sent twice. In other words, the customer receives two of the same order confirmation emails. If a customer contacts me through the contact form, they receive two identical messages stating that there comment has been submitted. Etc, Etc. If I removed the $bcc = '[email protected]'; that I added and test then emails are only sent once as they should be. Obviously, I am doing something wrong here. Can anyone help me out on how I can set it up so that all messages are BCC to an email address that I specify? I am using version 1.6.1.6 Edited July 15, 2016 by csimmons222 (see edit history) Link to comment Share on other sites More sharing options...
JoseMi67 Posted July 15, 2016 Share Posted July 15, 2016 Look for this post in spanish https://www.prestashop.com/forums/topic/366012-aporte-recibir-copia-bcc-de-todos-los-emails/ and the original in english https://www.prestashop.com/forums/topic/149416-solved-bcc-copy-of-order-confirmation-mail/ Good luck! Link to comment Share on other sites More sharing options...
csimmons222 Posted July 15, 2016 Author Share Posted July 15, 2016 Look for this post in spanish https://www.prestashop.com/forums/topic/366012-aporte-recibir-copia-bcc-de-todos-los-emails/ and the original in english https://www.prestashop.com/forums/topic/149416-solved-bcc-copy-of-order-confirmation-mail/ Good luck! That swift.php file that is referenced in that post does not exist in v1.6.1.6. Link to comment Share on other sites More sharing options...
EdEichman Posted July 15, 2016 Share Posted July 15, 2016 That swift.php file that is referenced in that post does not exist in v1.6.1.6. I'm doing something similar by overriding the MailCore class (http://doc.prestashop.com/display/PS16/Overriding+default+behaviors) in 1.6.1.5, and it works 100% correctly. However, the basic effect should be the same for your method. You may want to run a debugger on the code to see what is happening. If you're changing core files, maybe some other change you did is effecting this? Link to comment Share on other sites More sharing options...
csimmons222 Posted July 16, 2016 Author Share Posted July 16, 2016 I'm doing something similar by overriding the MailCore class (http://doc.prestashop.com/display/PS16/Overriding+default+behaviors) in 1.6.1.5, and it works 100% correctly. However, the basic effect should be the same for your method. You may want to run a debugger on the code to see what is happening. If you're changing core files, maybe some other change you did is effecting this? Will you tell me what code you added an where to achieve this? Link to comment Share on other sites More sharing options...
Ventanazos Posted December 10, 2016 Share Posted December 10, 2016 I'm doing something similar by overriding the MailCore class (http://doc.prestashop.com/display/PS16/Overriding+default+behaviors) in 1.6.1.5, and it works 100% correctly. However, the basic effect should be the same for your method. You may want to run a debugger on the code to see what is happening. If you're changing core files, maybe some other change you did is effecting this? Would you tell me what code you added and where to achieve this? Link to comment Share on other sites More sharing options...
Coloranti Posted March 21, 2017 Share Posted March 21, 2017 Will you tell me what code you added an where to achieve this? Would you tell me what code you added and where to achieve this? Solution in this thread, thanks to Bellini13: https://www.prestashop.com/forums/topic/558967-161-bcc-all-mail-to-shopowner/?p=2423249 It worked for me. 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