- Timestamp:
- 2010/03/11 10:35:11 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tmp/version-2_5-test/data/class/helper/SC_Helper_Mail.php
r18177 r18609 45 45 46 46 /* DBに登録されたテンプレートメールの送信 */ 47 function sfSendTemplateMail($to, $to_name, $template_id, &$objPage ) {47 function sfSendTemplateMail($to, $to_name, $template_id, &$objPage, $from_address = "", $from_name = "", $reply_to = "") { 48 48 49 49 $objQuery = new SC_Query(); … … 65 65 // メール送信処理 66 66 $objSendMail = new SC_SendMail_Ex(); 67 $from = $arrInfo['email03']; 68 $error = $arrInfo['email04']; 69 $tosubject = $tmp_subject; 70 $objSendMail->setItem('', $tosubject, $body, $from, $arrInfo['shop_name'], $from, $error, $error); 67 if ($from_address == "") $from_address = $arrInfo['email03']; 68 if ($from_name == "") $from_name = $arrInfo['shop_name']; 69 if ($reply_to == "") $reply_to = $arrInfo['email03']; 70 $error = $arrInfo['email04']; 71 $tosubject = $this->sfMakeSubject($tmp_subject); 72 73 $objSendMail->setItem('', $tosubject, $body, $from_address, $from_name, $reply_to, $error, $error); 71 74 $objSendMail->setTo($to, $to_name); 72 75 $objSendMail->sendMail(); // メール送信 … … 143 146 $from = $arrInfo['email03']; 144 147 $error = $arrInfo['email04']; 145 146 $tosubject = $this->sfMakeSubject($objQuery, $objMailView, 147 $objPage, $tmp_subject); 148 $tosubject = $this->sfMakeSubject($tmp_subject); 148 149 149 150 $objSendMail->setItem('', $tosubject, $body, $from, $arrInfo['shop_name'], $from, $error, $error, $bcc); … … 162 163 163 164 // テンプレートを使用したメールの送信 164 function sfSendTplMail($to, $ subject, $tplpath, &$objPage) {165 function sfSendTplMail($to, $tmp_subject, $tplpath, &$objPage) { 165 166 $objMailView = new SC_SiteView(); 166 167 $objSiteInfo = new SC_SiteInfo(); … … 173 174 // メール送信処理 174 175 $objSendMail = new SC_SendMail_Ex(); 175 $to = mb_encode_mimeheader($to);176 176 $bcc = $arrInfo['email01']; 177 177 $from = $arrInfo['email03']; 178 178 $error = $arrInfo['email04']; 179 $objSendMail->setItem($to, $subject, $body, $from, $arrInfo['shop_name'], $from, $error, $error, $bcc); 179 $tosubject = $this->sfMakeSubject($tmp_subject); 180 181 $objSendMail->setItem($to, $tosubject, $body, $from, $arrInfo['shop_name'], $from, $error, $error, $bcc); 180 182 $objSendMail->sendMail(); 181 183 } 182 184 183 185 // 通常のメール送信 184 function sfSendMail($to, $ subject, $body) {186 function sfSendMail($to, $tmp_subject, $body) { 185 187 $objSiteInfo = new SC_SiteInfo(); 186 188 $arrInfo = $objSiteInfo->data; … … 190 192 $from = $arrInfo['email03']; 191 193 $error = $arrInfo['email04']; 192 $objSendMail->setItem($to, $subject, $body, $from, $arrInfo['shop_name'], $from, $error, $error, $bcc); 194 $tosubject = $this->sfMakeSubject($tmp_subject); 195 196 $objSendMail->setItem($to, $tosubject, $body, $from, $arrInfo['shop_name'], $from, $error, $error, $bcc); 193 197 $objSendMail->sendMail(); 194 198 } 195 199 196 200 //件名にテンプレートを用いる 197 function sfMakeSubject(&$objQuery, &$objMailView, &$objPage, $subject){ 198 201 function sfMakeSubject($subject) { 202 $objQuery = new SC_Query(); 203 $objMailView = new SC_SiteView(); 204 $objTplAssign = new stdClass; 205 199 206 $arrInfo = $objQuery->select("*","dtb_baseinfo"); 200 207 $arrInfo = $arrInfo[0]; 201 $obj Page->tpl_shopname=$arrInfo['shop_name'];202 $obj Page->tpl_infoemail=$subject;203 $obj MailView->assignobj($objPage);204 $ mailtitle = $objMailView->fetch('mail_templates/mail_title.tpl');205 $ ret = $mailtitle.$subject;206 return $ ret;208 $objTplAssign->tpl_shopname=$arrInfo['shop_name']; 209 $objTplAssign->tpl_infoemail=$subject; // 従来互換 210 $objTplAssign->tpl_mailtitle=$subject; 211 $objMailView->assignobj($objTplAssign); 212 $subject = $objMailView->fetch('mail_templates/mail_title.tpl'); 213 return $subject; 207 214 } 208 215
Note: See TracChangeset
for help on using the changeset viewer.