Jump to content

[Resolved] BCC all Mails from my shop PS 1.6


doudoujack

Recommended Posts

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 by doudoujack (see edit history)
Link to comment
Share on other sites

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

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

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...