Commit 9667a1ad1a214c7c27dddd7c8376fc791da6ee62

Authored by root
1 parent bb9cdc57

bug fix

@@ -549,11 +549,11 @@ if($tmp_flg==0){ @@ -549,11 +549,11 @@ if($tmp_flg==0){
549 $strComment = jcodeconvert($strComment, 1, 3); 549 $strComment = jcodeconvert($strComment, 1, 3);
550 $Header="";//ヘッダー部クリア 550 $Header="";//ヘッダー部クリア
551 $Header1 = ""; 551 $Header1 = "";
552 - 552 +
553 if($_REQUEST["NowSend"] != "on"){ 553 if($_REQUEST["NowSend"] != "on"){
554 if($_REQUEST["SendType"] == "0" || $_REQUEST["SendType"] == "1"){ 554 if($_REQUEST["SendType"] == "0" || $_REQUEST["SendType"] == "1"){
555 if($strToMob!=""){ 555 if($strToMob!=""){
556 - $intBool2 = mail($strToMob,$strSubject,$strComment.$Comment_tel.$koukokuTEL,$Header1,"-f ".$strSubmitAdd);//携帯に送信 556 + $intBool2 = mail($strToMob,$strSubject,$strComment.$Comment_tel.$koukokuTEL.jcodeconvert(group_admin_addr($strSubmitAdd), 1, 3),$Header1,"-f ".$NOREPLY_ADDR);//携帯に送信
557 $logFrom[$intCountLog] = $strSubmitAdd; 557 $logFrom[$intCountLog] = $strSubmitAdd;
558 $logTo[$intCountLog] = $strToMob; 558 $logTo[$intCountLog] = $strToMob;
559 $logType[$intCountLog] = 1; 559 $logType[$intCountLog] = 1;
@@ -595,7 +595,7 @@ if($tmp_flg==0){ @@ -595,7 +595,7 @@ if($tmp_flg==0){
595 if($_REQUEST["NowSend"] != "on"){ 595 if($_REQUEST["NowSend"] != "on"){
596 if($_REQUEST["SendType"] == "0" || $_REQUEST["SendType"] == "2"){ 596 if($_REQUEST["SendType"] == "0" || $_REQUEST["SendType"] == "2"){
597 if($strTo!=""){ 597 if($strTo!=""){
598 - $intBool = mail($strTo, $strSubject, $strComment.$Comment_pc.$koukokuPC,$Header,"-f ".$strSubmitAdd);//PCに送信 598 + $intBool = mail($strTo, $strSubject, $strComment.$Comment_pc.$koukokuPC.jcodeconvert(group_admin_addr($strSubmitAdd), 1, 3),$Header,"-f ".$NOREPLY_ADDR);//PCに送信
599 $logFrom[$intCountLog] = $strSubmitAdd; 599 $logFrom[$intCountLog] = $strSubmitAdd;
600 $logTo[$intCountLog] = $strToMob; 600 $logTo[$intCountLog] = $strToMob;
601 $logType[$intCountLog] = 0; 601 $logType[$intCountLog] = 0;
@@ -336,7 +336,7 @@ if($tmp_flg==0){ @@ -336,7 +336,7 @@ if($tmp_flg==0){
336 if($_REQUEST["NowSend"] != "on"){ 336 if($_REQUEST["NowSend"] != "on"){
337 if($_REQUEST["SendType"] == "0" || $_REQUEST["SendType"] == "1"){ 337 if($_REQUEST["SendType"] == "0" || $_REQUEST["SendType"] == "1"){
338 if($strToMob!=""){ 338 if($strToMob!=""){
339 - $intBool2 = mail($strToMob,$strSubject,$strComment.$Comment_tel.$koukokuTEL,$Header1,"-f ".$strSubmitAdd);//携帯に送信 339 + $intBool2 = mail($strToMob,$strSubject,$strComment.$Comment_tel.$koukokuTEL.jcodeconvert(group_admin_addr($strSubmitAdd), 1, 3),$Header1,"-f ".$NOREPLY_ADDR);//携帯に送信
340 $logFrom[$intCountLog] = $strSubmitAdd; 340 $logFrom[$intCountLog] = $strSubmitAdd;
341 $logTo[$intCountLog] = $strToMob; 341 $logTo[$intCountLog] = $strToMob;
342 $logType[$intCountLog] = 1; 342 $logType[$intCountLog] = 1;
@@ -378,7 +378,7 @@ if($tmp_flg==0){ @@ -378,7 +378,7 @@ if($tmp_flg==0){
378 if($_REQUEST["NowSend"] != "on"){ 378 if($_REQUEST["NowSend"] != "on"){
379 if($_REQUEST["SendType"] == "0" || $_REQUEST["SendType"] == "2"){ 379 if($_REQUEST["SendType"] == "0" || $_REQUEST["SendType"] == "2"){
380 if($strTo!=""){ 380 if($strTo!=""){
381 - $intBool = mail($strTo, $strSubject, $strComment.$Comment_pc.$koukokuPC,$Header,"-f ".$strSubmitAdd);//PCに送信 381 + $intBool = mail($strTo, $strSubject, $strComment.$Comment_pc.$koukokuPC.jcodeconvert(group_admin_addr($strSubmitAdd), 1, 3),$Header,"-f ".$NOREPLY_ADDR);//PCに送信
382 $logFrom[$intCountLog] = $strSubmitAdd; 382 $logFrom[$intCountLog] = $strSubmitAdd;
383 $logTo[$intCountLog] = $strToMob; 383 $logTo[$intCountLog] = $strToMob;
384 $logType[$intCountLog] = 0; 384 $logType[$intCountLog] = 0;
@@ -335,7 +335,7 @@ if($tmp_flg==0){ @@ -335,7 +335,7 @@ if($tmp_flg==0){
335 if($_REQUEST["NowSend"] != "on"){ 335 if($_REQUEST["NowSend"] != "on"){
336 if($_REQUEST["SendType"] == "0" || $_REQUEST["SendType"] == "1"){ 336 if($_REQUEST["SendType"] == "0" || $_REQUEST["SendType"] == "1"){
337 if($strToMob!=""){ 337 if($strToMob!=""){
338 - $intBool2 = mail($strToMob,$strSubject,$strComment.$Comment_tel.$koukokuTEL,$Header1,"-f ".$strSubmitAdd);//携帯に送信 338 + $intBool2 = mail($strToMob,$strSubject,$strComment.$Comment_tel.$koukokuTEL.jcodeconvert(group_admin_addr($strSubmitAdd), 1, 3),$Header1,"-f ".$NOREPLY_ADDR);//携帯に送信
339 $logFrom[$intCountLog] = $strSubmitAdd; 339 $logFrom[$intCountLog] = $strSubmitAdd;
340 $logTo[$intCountLog] = $strToMob; 340 $logTo[$intCountLog] = $strToMob;
341 $logType[$intCountLog] = 1; 341 $logType[$intCountLog] = 1;
@@ -377,7 +377,7 @@ if($tmp_flg==0){ @@ -377,7 +377,7 @@ if($tmp_flg==0){
377 if($_REQUEST["NowSend"] != "on"){ 377 if($_REQUEST["NowSend"] != "on"){
378 if($_REQUEST["SendType"] == "0" || $_REQUEST["SendType"] == "2"){ 378 if($_REQUEST["SendType"] == "0" || $_REQUEST["SendType"] == "2"){
379 if($strTo!=""){ 379 if($strTo!=""){
380 - $intBool = mail($strTo, $strSubject, $strComment.$Comment_pc.$koukokuPC,$Header,"-f ".$strSubmitAdd);//PCに送信 380 + $intBool = mail($strTo, $strSubject, $strComment.$Comment_pc.$koukokuPC.jcodeconvert(group_admin_addr($strSubmitAdd), 1, 3),$Header,"-f ".$NOREPLY_ADDR);//PCに送信
381 $logFrom[$intCountLog] = $strSubmitAdd; 381 $logFrom[$intCountLog] = $strSubmitAdd;
382 $logTo[$intCountLog] = $strToMob; 382 $logTo[$intCountLog] = $strToMob;
383 $logType[$intCountLog] = 0; 383 $logType[$intCountLog] = 0;
@@ -28,6 +28,7 @@ $sendWait = 1; @@ -28,6 +28,7 @@ $sendWait = 1;
28 include("./include/dbcon.inc"); 28 include("./include/dbcon.inc");
29 include("./include/getDomain.inc"); 29 include("./include/getDomain.inc");
30 include("./include/jcode.phps"); 30 include("./include/jcode.phps");
  31 +include("./include/mtcnews.inc");
31 32
32 //***** 管理者アドレス,名前 *****// 33 //***** 管理者アドレス,名前 *****//
33 $strSQL = "SELECT "; 34 $strSQL = "SELECT ";
@@ -195,40 +196,43 @@ for($i=0;$i<count($bccArray);$i++){ @@ -195,40 +196,43 @@ for($i=0;$i<count($bccArray);$i++){
195 echo $i." / ".$bccArray[$i]."<hr>"; 196 echo $i." / ".$bccArray[$i]."<hr>";
196 197
197 //$timeS = date(); 198 //$timeS = date();
198 - $timeSFMT = date("Y/m/d H:i:s"); 199 + $bcc_list = explode(",", $bccArray[$i]);
  200 + foreach ($bcc_list as $bcc) {
  201 + $timeSFMT = date("Y/m/d H:i:s");
199 202
200 - $strFrom = "From: ".$strSubmitAdd."\n";  
201 - $strSubject = $Disp_Subject;  
202 - $strSubject = "=?iso-2022-jp?B?" . base64_encode(jcodeconvert($strSubject, 0, 3)) . "?=";  
203 - $GMT = date("Z");  
204 - $GMT_ABS = abs($GMT);  
205 - $GMT_HOUR = floor($GMT_ABS / 3600);  
206 - $GMT_MIN = floor(($GMT_ABS - $GMT_HOUR * 3600) / 60);  
207 - if ($GMT >= 0) $GMT_FLG = "+"; else $GMT_FLG = "-";  
208 - $GMT_RFC = date("D, d M Y H:i:s ").sprintf($GMT_FLG."%02d%02d", $GMT_HOUR, $GMT_MIN);  
209 - $Headers = "";  
210 - $Headers = "Date: ".$GMT_RFC."\n";  
211 - $Headers .= $strFrom;  
212 - $Headers .= "Bcc:".$bccArray[$i].";\r\n";  
213 - $Headers .= "Subject: $strSubject\n";  
214 - $Headers .= "MIME-Version: 1.0\n";  
215 - $Headers .= "X-Mailer: PHP/".phpversion()."\n";  
216 - $Headers .= "Content-type: text/plain; charset=ISO-2022-JP\n";  
217 - $Headers .= "Content-Transfer-Encoding: 7bit";  
218 -  
219 - //エンコード設定  
220 - $Mail_Body = $Disp_Body;  
221 - $Mail_Body .= "\n";  
222 - $Mail_Body .= "\n";  
223 - $Mail_Body .= "_/_/_/_/_/_/"."\n";  
224 - $Mail_Body .= "このメールはメール配信システム「め〜るNiポン!」より配信されています"."\n"; 203 + $strFrom = "From: ".$NOREPLY_ADDR."\n";
  204 + $strTo = "To: ".$bcc."\n";
  205 + $strSubject = $Disp_Subject;
  206 + $strSubject = "=?iso-2022-jp?B?" . base64_encode(jcodeconvert($strSubject, 0, 3)) . "?=";
  207 + $GMT = date("Z");
  208 + $GMT_ABS = abs($GMT);
  209 + $GMT_HOUR = floor($GMT_ABS / 3600);
  210 + $GMT_MIN = floor(($GMT_ABS - $GMT_HOUR * 3600) / 60);
  211 + if ($GMT >= 0) $GMT_FLG = "+"; else $GMT_FLG = "-";
  212 + $GMT_RFC = date("D, d M Y H:i:s ").sprintf($GMT_FLG."%02d%02d", $GMT_HOUR, $GMT_MIN);
  213 + $Headers = "";
  214 + $Headers = "Date: ".$GMT_RFC."\n";
  215 + $Headers .= $strFrom;
  216 + // $Headers .= "Bcc:".$bccArray[$i].";\r\n";
  217 + $Headers .= "Subject: $strSubject\n";
  218 + $Headers .= "MIME-Version: 1.0\n";
  219 + $Headers .= "X-Mailer: PHP/".phpversion()."\n";
  220 + $Headers .= "Content-type: text/plain; charset=ISO-2022-JP\n";
  221 + $Headers .= "Content-Transfer-Encoding: 7bit";
225 222
226 - //$Mail_Body = mb_convert_encoding($Mail_Body, "JIS", "auto");  
227 - //$Mail_Body = base64_encode(jcodeconvert($Mail_Body, 0, 3)) ;  
228 - //$Mail_Body = mb_convert_encoding($Mail_Body, "JIS", "auto");  
229 - $Mail_Body = mb_convert_encoding($Mail_Body, "JIS", "EUC-JP"); 223 + //エンコード設定
  224 + $Mail_Body = $Disp_Body;
  225 + $Mail_Body .= "\n";
  226 +
  227 + //$Mail_Body = mb_convert_encoding($Mail_Body, "JIS", "auto");
  228 + //$Mail_Body = base64_encode(jcodeconvert($Mail_Body, 0, 3)) ;
  229 + //$Mail_Body = mb_convert_encoding($Mail_Body, "JIS", "auto");
  230 + $Mail_Body = mb_convert_encoding($Mail_Body, "JIS", "EUC-JP");
  231 + //$intBool = mail($bcc, $strSubject, $Mail_Body.jcodeconvert(group_admin_addr($strSubmitAdd), 1, 3), $Headers, "-f".$NOREPLY_ADDR);
  232 + $intBool2 = mail($bcc,$strSubject,$Mail_Body.jcodeconvert(group_admin_addr($strSubmitAdd), 1, 3), "","-f ".$NOREPLY_ADDR);//真真
  233 +
  234 + }
230 235
231 - $intBool = mail("", $strSubject, $Mail_Body, $Headers, "-f".$strSubmitAdd);  
232 236
233 $timeEFMT = date("Y/m/d H:i:s"); 237 $timeEFMT = date("Y/m/d H:i:s");
234 $strSQL = "INSERT INTO send_time_log ("; 238 $strSQL = "INSERT INTO send_time_log (";
Please register or login to post a comment