/** * 正会員登録完了メール送信 * * @param string $registSecretKey * @access private * @return void */ public function lfSendRegistMail($registSecretKey) { $objQuery = SC_Query_Ex::getSingletonInstance(); $objCustomer = new SC_Customer_Ex(); $objHelperMail = new SC_Helper_Mail_Ex(); $objHelperMail->setPage($this); $CONF = SC_Helper_DB_Ex::sfGetBasisData(); //-- 会員データを取得 $arrCustomer = $objQuery->select('*', 'dtb_customer', 'secret_key = ?', array($registSecretKey)); $data = $arrCustomer[0]; $objCustomer->setLogin($data['email']); //-- メール送信 $objMailText = new SC_SiteView_Ex(); $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('会員登録が完了しました。'); $objMail = new SC_SendMail_Ex(); $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(); }
/** * 正会員登録完了メール送信 * * @param mixed $registSecretKey * @access private * @return void */ function lfSendRegistMail($registSecretKey) { $objQuery = SC_Query_Ex::getSingletonInstance(); $objCustomer = new SC_Customer_Ex(); $objHelperMail = new SC_Helper_Mail_Ex(); $CONF = SC_Helper_DB_Ex::sfGetBasisData(); //-- 会員データを取得 $arrCustomer = $objQuery->select("*", "dtb_customer", "secret_key = ?", array($registSecretKey)); $data = $arrCustomer[0]; $objCustomer->setLogin($data['email']); //-- メール送信 $objMailText = new SC_SiteView_Ex(); $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('会員登録が完了しました。'); $objMail = new SC_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(); }
function sfMakeSubject($subject, &$objMailView) { if (empty($objMailView)) { $objMailView = new SC_SiteView_Ex(); } $objTplAssign = new stdClass(); $arrInfo = SC_Helper_DB_Ex::sfGetBasisData(); $objTplAssign->tpl_shopname = $arrInfo['shop_name']; $objTplAssign->tpl_infoemail = $subject; // 従来互換 $objTplAssign->tpl_mailtitle = $subject; $objMailView->assignobj($objTplAssign); $subject = $objMailView->fetch('mail_templates/mail_title.tpl'); return $subject; }
/** * パスワード変更お知らせメールを送信する. * * @param array $CONF 店舗基本情報の配列 * @param string $email 送信先メールアドレス * @param string $customer_name 送信先氏名 * @param string $new_password 変更後の新パスワード * @return void * * FIXME: メールテンプレート編集の方に足すのが望ましい */ function lfSendMail(&$CONF, $email, $customer_name, $new_password) { // パスワード変更お知らせメール送信 $objMailText = new SC_SiteView_Ex(false); $objMailText->setPage($this); $objMailText->assign('customer_name', $customer_name); $objMailText->assign('new_password', $new_password); $toCustomerMail = $objMailText->fetch('mail_templates/forgot_mail.tpl'); $objHelperMail = new SC_Helper_Mail_Ex(); $objHelperMail->setPage($this); // メール送信オブジェクトによる送信処理 $objMail = new SC_SendMail_Ex(); $objMail->setItem('', $objHelperMail->sfMakeSubject('パスワードを変更いたしました。'), $toCustomerMail, $CONF['email03'], $CONF['shop_name'], $CONF['email03'], $CONF['email04'], $CONF['email04']); $objMail->setTo($email, $customer_name . ' 様'); $objMail->sendMail(); return; }
/** * 会員登録完了メール送信する * * @access private * @return void */ public function lfSendMail($uniqid, $arrForm) { $CONF = SC_Helper_DB_Ex::sfGetBasisData(); $objMailText = new SC_SiteView_Ex(); $objMailText->setPage($this); $objMailText->assign('CONF', $CONF); $objMailText->assign('name01', $arrForm['name01']); $objMailText->assign('name02', $arrForm['name02']); $objMailText->assign('uniqid', $uniqid); $objMailText->assignobj($this); $objHelperMail = new SC_Helper_Mail_Ex(); $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'); } $objMail = new SC_SendMail_Ex(); $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(); }
/** * @param SC_SiteView_Ex $objMailView */ public function sfMakeSubject($subject, &$objMailView = NULL) { if (empty($objMailView)) { $objMailView = new SC_SiteView_Ex(); $objMailView->setPage($this->getPage()); } $objTplAssign = new stdClass(); $arrInfo = SC_Helper_DB_Ex::sfGetBasisData(); $objTplAssign->tpl_shopname = $arrInfo['shop_name']; $objTplAssign->tpl_infoemail = $subject; // 従来互換 $objTplAssign->tpl_mailtitle = $subject; $objMailView->assignobj($objTplAssign); $subject = $objMailView->fetch('mail_templates/mail_title.tpl'); // #1940 (SC_Helper_Mail#sfMakeSubject 先頭に改行を含む値を返す) 対応 $subject = trim($subject); return $subject; }
/** * 会員登録完了メール送信する * * @access private * @return void */ function lfSendMail($uniqid, $arrForm) { $CONF = SC_Helper_DB_Ex::sfGetBasisData(); $objMailText = new SC_SiteView_Ex(); $objMailText->setPage($this); $objMailText->assign('CONF', $CONF); $objMailText->assign('name01', $arrForm['name01']); $objMailText->assign('name02', $arrForm['name02']); $objMailText->assign('uniqid', $uniqid); $objMailText->assignobj($this); $objHelperMail = new SC_Helper_Mail_Ex(); $objHelperMail->setPage($this); // 仮会員が有効の場合 if (CUSTOMER_CONFIRM_MAIL == true) { $subject = $objHelperMail->sfMakeSubject(t('c_Confirmation of member registration_02')); $toCustomerMail = $objMailText->fetch('mail_templates/customer_mail.tpl'); } else { $subject = $objHelperMail->sfMakeSubject(t('c_Completion of member registration_02')); $toCustomerMail = $objMailText->fetch('mail_templates/customer_regist_mail.tpl'); } $objMail = new SC_SendMail_Ex(); $objMail->setItem('', $subject, $toCustomerMail, $CONF['email03'], $CONF['shop_name'], $CONF['email03'], $CONF['email04'], $CONF['email04'], $CONF['email01']); // 宛先の設定 $objMail->setTo($arrForm['email'], t('f_NAME_FULL_SIR_01', array('T_ARG1' => $arrForm['name01'], 'T_ARG2' => $arrForm['name02']))); $objMail->sendMail(); }
/** * パスワード変更お知らせメールを送信する. * * @param array $CONF 店舗基本情報の配列 * @param string $email 送信先メールアドレス * @param string $customer_name 送信先氏名 * @param string $new_password 変更後の新パスワード * @return void * * FIXME: メールテンプレート編集の方に足すのが望ましい */ function lfSendMail(&$CONF, $email, $customer_name, $new_password) { // パスワード変更お知らせメール送信 $objMailText = new SC_SiteView_Ex(false); $objMailText->setPage($this); $objMailText->assign('customer_name', $customer_name); $objMailText->assign('new_password', $new_password); $toCustomerMail = $objMailText->fetch('mail_templates/forgot_mail.tpl'); $objHelperMail = new SC_Helper_Mail_Ex(); $objHelperMail->setPage($this); // メール送信オブジェクトによる送信処理 $objMail = new SC_SendMail_Ex(); $objMail->setItem('', $objHelperMail->sfMakeSubject(t('c_The password has been changed._01')), $toCustomerMail, $CONF['email03'], $CONF['shop_name'], $CONF['email03'], $CONF['email04'], $CONF['email04']); $objMail->setTo($email, t('f_LAST_NAME_SIR_01', array('T_ARG1' => $customer_name))); $objMail->sendMail(); return; }