Rabatkoder Posted March 7, 2013 Share Posted March 7, 2013 Hello, how do i edit this code to send to a specific email adress when a new user registers? I want to forward all the information except password. :-) The snippet is from AuthController.php protected function sendConfirmationMail(Customer $customer) { return Mail::Send( $this->context->language->id, 'account', Mail::l('Welcome!'), array( '{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{passwd}' => Tools::getValue('passwd')), $customer->email, $customer->firstname.' '.$customer->lastname ); } Link to comment Share on other sites More sharing options...
PascalVG Posted March 8, 2013 Share Posted March 8, 2013 (edited) You could copy the command to send the Email and resend it to another Email address. Something like (Didn't test it, but think should work like this): protected function sendConfirmationMail(Customer $customer) { // first send info to new receiver Mail::Send( // No return yet... $this->context->language->id, 'account', Mail::l('Welcome!'), array( '{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{passwd}' => '<hidden>'), // Edit here '[email protected]', // Edit here 'Receiver first name'.' '.'Receiver last name' ); // Then send original message return Mail::Send( $this->context->language->id, 'account', Mail::l('Welcome!'), array( '{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{passwd}' => Tools::getValue('passwd')), $customer->email, $customer->firstname.' '.$customer->lastname ); } Hope this helps, Pascal Edited March 8, 2013 by PascalVG (see edit history) Link to comment Share on other sites More sharing options...
josear Posted September 6, 2014 Share Posted September 6, 2014 Señor Pascal, funciona perfecto en la versión 1.5.4.0, Muchas gracias, 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