Esempio n. 1
0
 /**
  * Send password reset notification mail.
  *
  * @param $Customer 会員情報
  */
 public function sendPasswordResetCompleteMail(\Eccube\Entity\Customer $Customer, $password)
 {
     $body = $this->app->renderView('Mail/reset_complete_mail.twig', array('Customer' => $Customer, 'password' => $password));
     $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, 'password' => $password), null);
     $this->app['eccube.event.dispatcher']->dispatch(EccubeEvents::MAIL_PASSWORD_RESET_COMPLETE, $event);
     $this->app->mail($message);
 }
 /**
  * PDFに店舗情報を設定する
  * ショップ名、ロゴ画像以外はdtb_helpに登録されたデータを使用する.
  */
 protected function renderShopData()
 {
     // 基準座標を設定する
     $this->setBasePosition();
     // 特定商取引法を取得する
     /* @var Help $Help */
     $Help = $this->app['eccube.repository.help']->get();
     // ショップ名
     $this->lfText(125, 60, $this->BaseInfo->getShopName(), 8, 'B');
     // URL
     $this->lfText(125, 63, $Help->getLawUrl(), 8);
     // 会社名
     $this->lfText(125, 68, $Help->getLawCompany(), 8);
     // 郵便番号
     $text = '〒 ' . $Help->getLawZip01() . ' - ' . $Help->getLawZip02();
     $this->lfText(125, 71, $text, 8);
     // 都道府県+所在地
     $lawPref = $Help->getLawPref() ? $Help->getLawPref()->getName() : null;
     $text = $lawPref . $Help->getLawAddr01();
     $this->lfText(125, 74, $text, 8);
     $this->lfText(125, 77, $Help->getLawAddr02(), 8);
     // 電話番号
     $text = 'TEL: ' . $Help->getLawTel01() . '-' . $Help->getLawTel02() . '-' . $Help->getLawTel03();
     //FAX番号が存在する場合、表示する
     if (strlen($Help->getLawFax01()) > 0) {
         $text .= ' FAX: ' . $Help->getLawFax01() . '-' . $Help->getLawFax02() . '-' . $Help->getLawFax03();
     }
     $this->lfText(125, 80, $text, 8);
     //TEL・FAX
     // メールアドレス
     if (strlen($Help->getLawEmail()) > 0) {
         $text = 'Email: ' . $Help->getLawEmail();
         $this->lfText(125, 83, $text, 8);
         // Email
     }
     // ロゴ画像(app配下のロゴ画像を優先して読み込む)
     $logoFile = $this->app['config']['OrderPdf']['const']['logo_file'];
     $originalPath = __DIR__ . '/../Resource/template/' . $logoFile;
     $userPath = $this->app['config']['template_realdir'] . '/../admin/OrderPdf/' . $logoFile;
     $logoFilePath = file_exists($userPath) ? $userPath : $originalPath;
     $this->Image($logoFilePath, 124, 46, 40);
 }
 /**
  * メールを送信する
  * @param array $formData メルマガ情報
  *                  email: 送信先メールアドレス
  *                  subject: 件名
  *                  body:本文
  */
 protected function sendMail($formData)
 {
     // メール送信
     $message = \Swift_Message::newInstance()->setSubject($formData['subject'])->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))->setTo(array($formData['email']))->setReplyTo($this->BaseInfo->getEmail03())->setReturnPath($this->BaseInfo->getEmail04())->setBody($formData['body']);
     return $this->app->mail($message);
 }
Esempio n. 4
0
 /**
  * Send password reset notification mail.
  *
  * @param $Customer 会員情報
  */
 public function sendPasswordResetCompleteMail(\Eccube\Entity\Customer $Customer, $password)
 {
     $body = $this->app->renderView('Mail/reset_complete_mail.twig', array('Customer' => $Customer, 'password' => $password));
     $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);
     $this->app->mail($message);
 }