"; } if(!$mail){ $err .= "E-mailが空白です
"; } if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@([0-9a-z](-?[0-9a-z])*\.)+[a-z]{2}([zmuvtg]|fo|me)?$",$mail)){ $err .= "差出人メールアドレスが正しくありません
"; } //if(!$year){ // $err .= "生年月日(年)が空白です
"; //} //if(!$month){ // $err .= "生年月日(月)が空白です
"; //} //if(!$day){ // $err .= "生年月日(日)が空白です
"; //} if( $err ){ $err = "入力に誤りがありますので、再度入力してください。
" . $err; $sendPage .= "form.html"; break; } $err = "内容をご確認ください。"; /////////////////////////////////////////// $upfile = $_FILES['upfile']['tmp_name']; $upfile_name = $_FILES['upfile']['name']; $upfile_type = $_FILES['upfile']['type']; foreach($upfile as $key=>$val){ $r = move_uploaded_file ($val, "{$MST_IMG_DIR}{$upfile_name[$key]}"); } /////////////////////////////////////////// $sendPage .= "kakunin.html"; break; case "2": // 変更の場合は、再度入力しょりへ $sw = $_POST["sw"]; if( $sw == "変更" ){ $sendPage .= "form.html"; break; } // メールフォーマット生成 $body .= "内容選択 :" . $Dtype[ floor( $type ) ] . "\n"; $body .= "お名前 :" . $name . "\n"; $body .= "電話番号 :" . $tel . "\n"; $body .= "E-Mail :" . $mail . "\n"; $body .= "郵便番号 :" . $zip . "\n"; $body .= "住所 :" . $dpref[ floor( $area ) ] . $address . "\n"; $body .= "ご希望連絡手段 :" . $Drenraku[ floor( $renraku ) ] . "\n"; $body .= "ご希望連絡時間帯 :" . $Djikan[ floor( $jikan ) ] . "\n"; $body .= "エレベーター :" . $Dele[ floor( $ele ) ] . "\n"; $body .= "お見積希望日時 :" . $year ."年".$dmonth[ floor( $month ) ]."月 ".$dday[ floor( $day ) ] ."日". "\n"; $body .= "見積商品 : " . $goods . "\n"; $body .= "ご質問 : " . $free . "\n"; $body .= "----------------------------------------------\n"; $body .= "ブラウザ : " . $_SERVER["HTTP_USER_AGENT"] . "\n"; $body .= "応募日時 : " . date( "Y/m/d H:i:s" ) . "\n"; $body .= "IP : " . $_SERVER["REMOTE_ADDR"] . "\n"; //メール送信 $from="From:$mail"; // jmail ( $tomail , $mailsubject, $body ); //////////////////////////////////////////////////////////// $mail_to = $tomail; // $mail_to = 'uchida@legal-lab.com'; $name_to = 'angle-co.com'; $mail_fr = $mail; $name_fr = $name; $mail_subject = $mailsubject; $mail_body = $body; include "matsMail.inc"; $m = new matsMail(); $m->useMTA(); $m->mta("/usr/sbin/sendmail -f '__from__' -- '__to__'"); $m->hasAttachment(); foreach($_REQUEST[upfile_name] as $val){ if($val){ $file = $MST_IMG_DIR.$val; $fp = fopen($file, "r"); $bin = fread($fp, filesize($file)); $m->addAttachment($bin, $val, "application/octet-stream"); } } $m->subject($mail_subject); $m->from($mail_fr, $name_fr); $m->body($mail_body); $m->resetHeader(); $m->to($mail_to, $name_to); $m->addHeader("X-COUNT", "1025"); // $m->addHeader("X-HOGEHOGE", i18n_mime_header_encode("hogeh%%日本語#)&)('#RTgehoge")); //mb_encode_mimeheader $m->addHeader("X-HOGEHOGE", mb_encode_mimeheader("hogeh%%日本語#)&)('#RTgehoge")); $m->send(); //////////////////////////////////////////////////////////// $sendPage .= "thanks.html"; break; default: $err = "下記の要項にご入力下さい。。"; $sendPage .= "form.html"; } include $sendPage; ?>