Пример #1
0
 /**
  * Send contact mail.
  *
  * @param $formData お問い合わせ内容
  */
 public function sendContactMail($formData)
 {
     $body = $this->app->renderView('Mail/contact_mail.twig', array('data' => $formData, 'BaseInfo' => $this->BaseInfo));
     // 問い合わせ者にメール送信
     $message = \Swift_Message::newInstance()->setSubject('[' . $this->BaseInfo->getShopName() . '] お問い合わせを受け付けました。')->setFrom(array($this->BaseInfo->getEmail02() => $this->BaseInfo->getShopName()))->setTo(array($formData['email']))->setBcc($this->BaseInfo->getEmail02())->setReplyTo($this->BaseInfo->getEmail02())->setReturnPath($this->BaseInfo->getEmail04())->setBody($body);
     $this->app->mail($message);
 }
Пример #2
0
 /**
  * Send contact mail.
  *
  * @param $formData お問い合わせ内容
  */
 public function sendContactMail($formData)
 {
     $body = $this->app->renderView('Mail/contact_mail.twig', array('data' => $formData, 'BaseInfo' => $this->BaseInfo));
     // 問い合わせ者にメール送信
     $message = \Swift_Message::newInstance()->setSubject('[' . $this->BaseInfo->getShopName() . '] お問い合わせを受け付けました。')->setFrom(array($this->BaseInfo->getEmail02() => $this->BaseInfo->getShopName()))->setTo(array($formData['email']))->setBcc($this->BaseInfo->getEmail02())->setReplyTo($this->BaseInfo->getEmail02())->setReturnPath($this->BaseInfo->getEmail04())->setBody($body);
     $event = new EventArgs(array('message' => $message, 'formData' => $formData, 'BaseInfo' => $this->BaseInfo), null);
     $this->app['eccube.event.dispatcher']->dispatch(EccubeEvents::MAIL_CONTACT, $event);
     $this->app->mail($message);
 }