Jump to content

Is it possible to send two copies of the email alert when an order is placed?


Recommended Posts

Hi there! Been trying to solve this for the past two weeks without any success.

I want the mail system to send two copies of the smae email both to the admin of the shop and customer when an order is placed.
I'm referring to the new_order.html e-mail.

I tried something that should work, but it's not.

on /modules/mailalerts/mailalerts.php, I modified line 198 from

if (file_exists(dirname(__FILE__).'/mails/'.$iso.'/'.$template.'.txt') AND file_exists(dirname(__FILE__).'/mails/'.$iso.'/'.$template.'.html'))
       {
           Mail::Send($id_lang, $template, $subject, $templateVars, explode(self::__MA_MAIL_DELIMITOR__, $this->_merchant_mails), NULL, $configuration['PS_SHOP_EMAIL'], $configuration['PS_SHOP_NAME'], NULL, NULL, dirname(__FILE__).'/mails/');


to

if (file_exists(dirname(__FILE__).'/mails/'.$iso.'/'.$template.'.txt') AND file_exists(dirname(__FILE__).'/mails/'.$iso.'/'.$template.'.html'))
       {
           Mail::Send($id_lang, $template, $subject, $templateVars, explode(self::__MA_MAIL_DELIMITOR__, $this->_merchant_mails), NULL, $configuration['PS_SHOP_EMAIL'], $configuration['PS_SHOP_NAME'], NULL, NULL, dirname(__FILE__).'/mails/');

           Mail::Send($id_lang, $template, $subject, $templateVars, explode(self::__MA_MAIL_DELIMITOR__, $this->_merchant_mails), NULL, $customer->email, $configuration['PS_SHOP_NAME'], NULL, NULL, dirname(__FILE__).'/mails/');
       }



First mail to admin PS_SHOP_EMAIL is working, but the second one $customer->email it's not.

Any clues?

Thanks!!! ::)

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