コード例 #1
0
ファイル: Index.php プロジェクト: ChigusaYasoda/ec-cube
 /**
  * パスワード変更お知らせメールを送信する.
  *
  * @param  array  $CONF          店舗基本情報の配列
  * @param  string $email         送信先メールアドレス
  * @param  string $customer_name 送信先氏名
  * @param  string $new_password  変更後の新パスワード
  * @return void
  *
  * FIXME: メールテンプレート編集の方に足すのが望ましい
  */
 public function lfSendMail(&$CONF, $email, $customer_name, $new_password)
 {
     // パスワード変更お知らせメール送信
     $objMailText = new SiteView(false);
     $objMailText->setPage($this);
     $objMailText->assign('customer_name', $customer_name);
     $objMailText->assign('new_password', $new_password);
     $toCustomerMail = $objMailText->fetch('mail_templates/forgot_mail.tpl');
     /* @var $objHelperMail MailHelper */
     $objHelperMail = Application::alias('eccube.helper.mail');
     $objHelperMail->setPage($this);
     // メール送信オブジェクトによる送信処理
     /* @var $objMail Sendmail */
     $objMail = Application::alias('eccube.sendmail');
     $objMail->setItem('', $objHelperMail->sfMakeSubject('パスワードを変更いたしました。'), $toCustomerMail, $CONF['email03'], $CONF['shop_name'], $CONF['email03'], $CONF['email04'], $CONF['email04']);
     $objMail->setTo($email, $customer_name . ' 様');
     $objMail->sendMail();
     return;
 }
コード例 #2
0
ファイル: MailHelper.php プロジェクト: ChigusaYasoda/ec-cube
 /**
  * 登録メールを送信する。
  *
  * @param  string  $secret_key  会員固有キー
  * @param  integer $customer_id 会員ID
  * @param  boolean $is_mobile   false(default):PCアドレスにメールを送る true:携帯アドレスにメールを送る
  * @param $resend_flg true  仮登録メール再送
  * @return boolean true:成功 false:失敗
  *  
  */
 public function sfSendRegistMail($secret_key, $customer_id = '', $is_mobile = false, $resend_flg = false)
 {
     // 会員データの取得
     if (Utils::sfIsInt($customer_id)) {
         $arrCustomerData = Application::alias('eccube.helper.customer')->sfGetCustomerDataFromId($customer_id);
     } else {
         $arrCustomerData = Application::alias('eccube.helper.customer')->sfGetCustomerDataFromId('', 'secret_key = ?', array($secret_key));
     }
     if (Utils::isBlank($arrCustomerData)) {
         return false;
     }
     $CONF = Application::alias('eccube.helper.db')->getBasisData();
     $objMailText = new SiteView();
     $objMailText->setPage($this->getPage());
     $objMailText->assign('CONF', $CONF);
     $objMailText->assign('name01', $arrCustomerData['name01']);
     $objMailText->assign('name02', $arrCustomerData['name02']);
     $objMailText->assign('uniqid', $arrCustomerData['secret_key']);
     $objMailText->assignobj($arrCustomerData);
     $objMailText->assignobj($this);
     $objHelperMail = new static();
     // 仮会員が有効の場合
     if (CUSTOMER_CONFIRM_MAIL == true and $arrCustomerData['status'] == 1 or $arrCustomerData['status'] == 1 and $resend_flg == true) {
         $subject = $objHelperMail->sfMakeSubject('会員登録のご確認', $objMailText);
         $toCustomerMail = $objMailText->fetch('mail_templates/customer_mail.tpl');
     } else {
         $subject = $objHelperMail->sfMakeSubject('会員登録のご完了', $objMailText);
         $toCustomerMail = $objMailText->fetch('mail_templates/customer_regist_mail.tpl');
     }
     /* @var $objSendMail Sendmail */
     $objMail = Application::alias('eccube.sendmail');
     $objMail->setItem('', $subject, $toCustomerMail, $CONF['email03'], $CONF['shop_name'], $CONF['email03'], $CONF['email04'], $CONF['email04'], $CONF['email01']);
     // 宛先の設定
     if ($is_mobile) {
         $to_addr = $arrCustomerData['email_mobile'];
     } else {
         $to_addr = $arrCustomerData['email'];
     }
     $objMail->setTo($to_addr, $arrCustomerData['name01'] . $arrCustomerData['name02'] . ' 様');
     $objMail->sendMail();
     return true;
 }
コード例 #3
0
ファイル: Refusal.php プロジェクト: ChigusaYasoda/ec-cube
 /**
  * 退会手続き完了メール送信する
  *
  * @access private
  * @param integer $customer_id 会員ID
  * @return void
  */
 public function lfSendRefusalMail($customer_id)
 {
     // 会員データの取得
     if (Utils::sfIsInt($customer_id)) {
         $arrCustomerData = Application::alias('eccube.helper.customer')->sfGetCustomerDataFromId($customer_id);
     }
     if (Utils::isBlank($arrCustomerData)) {
         return false;
     }
     $CONF = Application::alias('eccube.helper.db')->getBasisData();
     $objMailText = new SiteView();
     $objMailText->setPage($this);
     $objMailText->assign('CONF', $CONF);
     $objMailText->assign('name01', $arrCustomerData['name01']);
     $objMailText->assign('name02', $arrCustomerData['name02']);
     $objMailText->assignobj($this);
     /* @var $objHelperMail MailHelper */
     $objHelperMail = Application::alias('eccube.helper.mail');
     $objHelperMail->setPage($this);
     $subject = $objHelperMail->sfMakeSubject('退会手続きのご完了', $objMailText);
     $toCustomerMail = $objMailText->fetch('mail_templates/customer_refusal_mail.tpl');
     /* @var $objMail Sendmail */
     $objMail = Application::alias('eccube.sendmail');
     $objMail->setItem('', $subject, $toCustomerMail, $CONF['email03'], $CONF['shop_name'], $CONF['email03'], $CONF['email04'], $CONF['email04'], $CONF['email01']);
     $objMail->setTo($arrCustomerData['email'], $arrCustomerData['name01'] . $arrCustomerData['name02'] . ' 様');
     $objMail->sendMail();
 }
コード例 #4
0
ファイル: Index.php プロジェクト: ChigusaYasoda/ec-cube
 /**
  * 会員登録完了メール送信する
  *
  * @access private
  * @return void
  */
 public function lfSendMail($uniqid, $arrForm)
 {
     $CONF = Application::alias('eccube.helper.db')->getBasisData();
     $objMailText = new SiteView();
     $objMailText->setPage($this);
     $objMailText->assign('CONF', $CONF);
     $objMailText->assign('name01', $arrForm['name01']);
     $objMailText->assign('name02', $arrForm['name02']);
     $objMailText->assign('uniqid', $uniqid);
     $objMailText->assignobj($this);
     /* @var $objHelperMail MailHelper */
     $objHelperMail = Application::alias('eccube.helper.mail');
     $objHelperMail->setPage($this);
     // 仮会員が有効の場合
     if (CUSTOMER_CONFIRM_MAIL == true) {
         $subject = $objHelperMail->sfMakeSubject('会員登録のご確認');
         $toCustomerMail = $objMailText->fetch('mail_templates/customer_mail.tpl');
     } else {
         $subject = $objHelperMail->sfMakeSubject('会員登録のご完了');
         $toCustomerMail = $objMailText->fetch('mail_templates/customer_regist_mail.tpl');
     }
     /* @var $objMail Sendmail */
     $objMail = Application::alias('eccube.sendmail');
     $objMail->setItem('', $subject, $toCustomerMail, $CONF['email03'], $CONF['shop_name'], $CONF['email03'], $CONF['email04'], $CONF['email04'], $CONF['email01']);
     // 宛先の設定
     $objMail->setTo($arrForm['email'], $arrForm['name01'] . $arrForm['name02'] . ' 様');
     $objMail->sendMail();
 }
コード例 #5
0
ファイル: Index.php プロジェクト: ChigusaYasoda/ec-cube
 /**
  * 正会員登録完了メール送信
  *
  * @param string $registSecretKey
  * @access private
  * @return void
  */
 public function lfSendRegistMail($registSecretKey)
 {
     $objQuery = Application::alias('eccube.query');
     /* @var $objCustomer Customer */
     $objCustomer = Application::alias('eccube.customer');
     /* @var $objHelperMail MailHelper */
     $objHelperMail = Application::alias('eccube.helper.mail');
     $objHelperMail->setPage($this);
     $CONF = Application::alias('eccube.helper.db')->getBasisData();
     //-- 会員データを取得
     $arrCustomer = $objQuery->select('*', 'dtb_customer', 'secret_key = ?', array($registSecretKey));
     $data = $arrCustomer[0];
     $objCustomer->setLogin($data['email']);
     //-- メール送信
     $objMailText = new SiteView();
     $objMailText->setPage($this);
     $objMailText->assign('CONF', $CONF);
     $objMailText->assign('name01', $data['name01']);
     $objMailText->assign('name02', $data['name02']);
     $toCustomerMail = $objMailText->fetch('mail_templates/customer_regist_mail.tpl');
     $subject = $objHelperMail->sfMakesubject('会員登録が完了しました。');
     /* @var $objMail Sendmail */
     $objMail = Application::alias('eccube.sendmail');
     $objMail->setItem('', $subject, $toCustomerMail, $CONF['email03'], $CONF['shop_name'], $CONF['email03'], $CONF['email04'], $CONF['email04']);
     // 宛先の設定
     $name = $data['name01'] . $data['name02'] . ' 様';
     $objMail->setTo($data['email'], $name);
     $objMail->sendMail();
 }