すみません。
私の書き方が分かりずらかったかもしれませんが、
既にある記述を変更するのではなく、書き足すというつもりでした。
例えば、仮会員登録メール送信の場合、以下のデフォルトのソースを
$body = $this->app->renderView('Mail/entry_confirm.twig', array(
'Customer' => $Customer,
'BaseInfo' => $this->BaseInfo,
'activateUrl' => $activateUrl,
));
$message = \Swift_Message::newInstance()
->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録のご確認')
->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
->setTo(array($Customer->getEmail()))
->setBcc($this->BaseInfo->getEmail01())
->setReplyTo($this->BaseInfo->getEmail03())
->setReturnPath($this->BaseInfo->getEmail04())
->setBody($body);
$event = new EventArgs(
array(
'message' => $message,
'Customer' => $Customer,
'BaseInfo' => $this->BaseInfo,
'activateUrl' => $activateUrl,
),
null
);
$this->app['eccube.event.dispatcher']->dispatch(EccubeEvents::MAIL_CUSTOMER_CONFIRM, $event);
$count = $this->app->mail($message, $failures);
log_info('仮会員登録メール送信完了', array('count' => $count));
以下のように変更するという意味です。
$body = $this->app->renderView('Mail/entry_confirm.twig', array(
'Customer' => $Customer,
'BaseInfo' => $this->BaseInfo,
'activateUrl' => $activateUrl,
));
$message = \Swift_Message::newInstance()
->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録のご確認')
->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
->setTo(array($Customer->getEmail()))
->setReplyTo($this->BaseInfo->getEmail03())
->setReturnPath($this->BaseInfo->getEmail04())
->setBody($body);
$event = new EventArgs(
array(
'message' => $message,
'Customer' => $Customer,
'BaseInfo' => $this->BaseInfo,
'activateUrl' => $activateUrl,
),
null
);
$this->app['eccube.event.dispatcher']->dispatch(EccubeEvents::MAIL_CUSTOMER_CONFIRM, $event);
$count = $this->app->mail($message, $failures);
//管理者向けのメール送信をここに追記↓
$message = \Swift_Message::newInstance()
->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録のご確認')
->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
->setTo(array($this->BaseInfo->getEmail01()))
->setReplyTo($this->BaseInfo->getEmail03())
->setReturnPath($this->BaseInfo->getEmail04())
->setBody($body);
$countDummy = $this->app->mail($message, $failures);
//ここまで↑
log_info('仮会員登録メール送信完了', array('count' => $count));
これと同じような追記を
MailService.phpのfunctionの分だけ変更する必要があると思います。