/** * パスワード変更お知らせメールを送信する. * * @param array $CONF 店舗基本情報の配列 * @param string $email 送信先メールアドレス * @param string $customer_name 送信先氏名 * @param string $temp_password 変更後のパスワード * @return void */ function lfSendMail($CONF, $email, $customer_name, $temp_password) { // パスワード変更お知らせメール送信 $this->customer_name = $customer_name; $this->temp_password = $temp_password; $objMailText = new SC_SiteView(); $objMailText->assignobj($this); $toCustomerMail = $objMailText->fetch("mail_templates/forgot_mail.tpl"); $objMail = new SC_SendMail(); $objMail->setItem('', "パスワードが変更されました" . "【" . $CONF["shop_name"] . "】", $toCustomerMail, $CONF["email03"], $CONF["shop_name"], $CONF["email03"], $CONF["email04"], $CONF["email04"]); $objMail->setTo($email, $customer_name . " 様"); $objMail->sendMail(); }
function lfRegistPreCustomer($arrData, $arrInfo) { // 購入時の会員登録 $sqlval['name01'] = $arrData['order_name01']; $sqlval['name02'] = $arrData['order_name02']; $sqlval['kana01'] = $arrData['order_kana01']; $sqlval['kana02'] = $arrData['order_kana02']; $sqlval['zip01'] = $arrData['order_zip01']; $sqlval['zip02'] = $arrData['order_zip02']; $sqlval['pref'] = $arrData['order_pref']; $sqlval['addr01'] = $arrData['order_addr01']; $sqlval['addr02'] = $arrData['order_addr02']; $sqlval['email'] = $arrData['order_email']; $sqlval['tel01'] = $arrData['order_tel01']; $sqlval['tel02'] = $arrData['order_tel02']; $sqlval['tel03'] = $arrData['order_tel03']; $sqlval['fax01'] = $arrData['order_fax01']; $sqlval['fax02'] = $arrData['order_fax02']; $sqlval['fax03'] = $arrData['order_fax03']; $sqlval['sex'] = $arrData['order_sex']; $sqlval['password'] = $arrData['password']; $sqlval['reminder'] = $arrData['reminder']; $sqlval['reminder_answer'] = $arrData['reminder_answer']; // メルマガ配信用フラグの判定 switch ($arrData['mail_flag']) { case '1': // HTMLメール $mail_flag = 4; break; case '2': // TEXTメール $mail_flag = 5; break; case '3': // 希望なし $mail_flag = 6; break; default: $mail_flag = 6; break; } // メルマガフラグ $sqlval['mailmaga_flg'] = $mail_flag; // 会員仮登録 $sqlval['status'] = 1; // URL判定用キー $sqlval['secret_key'] = SC_Utils_Ex::sfGetUniqRandomId("t"); $objQuery = new SC_Query(); $sqlval['create_date'] = "now()"; $sqlval['update_date'] = "now()"; $objQuery->insert("dtb_customer", $sqlval); // 顧客IDの取得 $arrRet = $objQuery->select("customer_id", "dtb_customer", "secret_key = ?", array($sqlval['secret_key'])); $customer_id = $arrRet[0]['customer_id']; // 仮登録完了メール送信 $objMailPage = $this; $objMailPage->to_name01 = $arrData['order_name01']; $objMailPage->to_name02 = $arrData['order_name02']; $objMailPage->CONF = $arrInfo; $objMailPage->uniqid = $sqlval['secret_key']; $objMailView = new SC_SiteView(); $objMailView->assignobj($objMailPage); $body = $objMailView->fetch("mail_templates/customer_mail.tpl"); $mailHelper = new SC_Helper_Mail_Ex(); $objMail = new SC_SendMail(); $objMail->setItem('', $mailHelper->sfMakeSubject($objQuery, $objMailView, $objMailPage, "会員登録のご確認"), $body, $arrInfo['email03'], $arrInfo['shop_name'], $arrInfo["email03"], $arrInfo["email04"], $arrInfo["email04"], $arrInfo["email01"]); // 宛先の設定 $name = $arrData['order_name01'] . $arrData['order_name02'] . " 様"; $objMail->setTo($arrData['order_email'], $name); $objMail->sendMail(); return $customer_id; }
function lfSendMail($CONF, &$objPage) { $objQuery = new SC_Query(); $objMailText = new SC_SiteView(); $objSiteInfo = $this->objView->objSiteInfo; $arrInfo = $objSiteInfo->data; $objPage->tpl_shopname = $arrInfo['shop_name']; $objPage->tpl_infoemail = $arrInfo['email02']; $objMailText->assignobj($objPage); $toCustomerMail = $objMailText->fetch("mail_templates/contact_mail.tpl"); $objMail = new SC_SendMail(); if ($objPage->arrForm['email']) { $fromMail_name = $objPage->arrForm['name01'] . " 様"; $fromMail_address = $objPage->arrForm['email']; } else { $fromMail_name = $CONF["shop_name"]; $fromMail_address = $CONF["email02"]; } $helperMail = new SC_Helper_Mail_Ex(); $subject = $helperMail->sfMakeSubject($objQuery, $objMailText, $this, "お問い合わせがありました。"); $objMail->setItem($CONF["email02"], $subject, $toCustomerMail, $fromMail_address, $fromMail_name, $fromMail_address, $CONF["email04"], $CONF["email04"]); $objMail->sendMail(); $subject = $helperMail->sfMakeSubject($objQuery, $objMailText, $this, "お問い合わせを受け付けました。"); $objMail->setItem('', $subject, $toCustomerMail, $CONF["email03"], $CONF["shop_name"], $CONF["email02"], $CONF["email04"], $CONF["email04"]); $objMail->setTo($objPage->arrForm['email'], $objPage->arrForm['name01'] . " 様"); $objMail->sendMail(); }
function sfSendTplMail($to, $subject, $tplpath, &$objPage) { $objMailView = new SC_SiteView(); $objSiteInfo = new SC_SiteInfo(); $arrInfo = $objSiteInfo->data; // メール本文の取得 $objPage->tpl_shopname = $arrInfo['shop_name']; $objPage->tpl_infoemail = $arrInfo['email02']; $objMailView->assignobj($objPage); $body = $objMailView->fetch($tplpath); // メール送信処理 $objSendMail = new SC_SendMail_Ex(); $to = mb_encode_mimeheader($to); $bcc = $arrInfo['email01']; $from = $arrInfo['email03']; $error = $arrInfo['email04']; $objSendMail->setItem($to, $subject, $body, $from, $arrInfo['shop_name'], $from, $error, $error, $bcc); $objSendMail->sendMail(); }
function lfSendRegistMail($registSecretKey) { $objQuery = new SC_Query(); $objHelperMail = new SC_Helper_Mail_Ex(); //-- 姓名を取得 $sql = "SELECT email, name01, name02 FROM dtb_customer WHERE secret_key = ?"; $result = $objQuery->getAll($sql, array($registSecretKey)); $data = $result[0]; //-- メール送信 $objMailText = new SC_SiteView(); $objMailText->assign("CONF", $this->CONF); $objMailText->assign("name01", $data["name01"]); $objMailText->assign("name02", $data["name02"]); $toCustomerMail = $objMailText->fetch("mail_templates/customer_regist_mail.tpl"); $subject = $objHelperMail->sfMakesubject($objQuery, $objMailText, $this, '会員登録が完了しました。'); $objMail = new SC_SendMail(); $objMail->setItem('', $subject, $toCustomerMail, $this->CONF["email03"], $this->CONF["shop_name"], $this->CONF["email03"], $this->CONF["email04"], $this->CONF["email04"]); // 宛先の設定 $name = $data["name01"] . $data["name02"] . " 様"; $objMail->setTo($data["email"], $name); $objMail->sendMail(); }