//메일형식 체크 function isValidEmail(input) { var format = /^((\w|[\-\.])+)@((\w|[\-\.])+)\.([A-Za-z]+)$/; return isValidFormat(input,format); } function isValidFormat(input,format) { if (input.value.search(format) != -1) { return true; //올바른 포맷 형식 } return false; } //form 체크 function check(form) { if (document.p_Request.c_name.value == 0) { alert('회사명을 입력해주세요 !'); p_Request.c_name.focus(); return(false); } if (document.p_Request.name.value == 0) { alert('담당자 이름을 입력해주세요 !'); p_Request.name.focus(); return(false); } if (document.p_Request.c_tel.value == 0) { alert('회사 전화번호를 입력해주세요 !'); p_Request.c_tel.focus(); return(false); } if (document.p_Request.c_email.value == 0) { alert('담당자 E-mail을 입력해주세요 !'); p_Request.c_email.focus(); return(false); } if (!isValidEmail(p_Request.c_email)) { alert('올바른 이메일 주소가 아닙니다. !'); p_Request.c_email.focus(); return(false); } return(true); }
기 본 정 보
회사명 * 부서명
담당자 * 전화번호 *
이메일 * FAX 번호
요 청 내 용 (①견적 요청 자료는 이메일로 송부해 주세요. dinett5527@gmail.com // order@dinett.com ② 빠른상담은 핸드폰(010-3007-2564)으로 연락주세요. 명함은 문자로 전송, ③ 카카오톡 상담 ID: dinett)
"); } if($mode == 'send') { //////////////////////////////////////////////////////////////////////////////////////////////// $to_adminemail ="order@dinett.com,dinett2564@naver.com"; $subject="$name 께서 개발용역 문의를 하셨습니다."; /////////////////////////////////////////////////////////////////////////////////////////////// $mailheaders .= "Return-Path: $c_email\r\n"; $mailheaders .= "Reply-To: $c_email\r\n"; $mailheaders .= "From: $name <$c_email>\nContent-Type:text/html;charset=euc-kr\r"; $p_contents = nl2br($p_contents); $p_site = nl2br($p_site); //////////////////////////////////////////////////////////////// 메일로 전송되어 지는 html 소스 $main="
 기본정보

회사명

$c_name

부서명

$p_name

전화번호

$c_tel

담당자 이름

$name

담당자 E-mail

$c_email

Fax

$fax

 요청사항 (①견적 요청 자료는 이메일로 송부해 주세요. dinett5527@gmail.com // order@dinett.com ② 빠른상담은 핸드폰(010-3007-2564)으로 연락주세요. 명함은 문자로 전송, ③ 카카오톡 상담 ID: dinett)

내 용

$p_contents

디넷뜨(주) 알앤디파트너

"; ///////////////////////////////////////////////////////////////////////////////////////////////// if ($Pfile and $Pfile_size) { $Pfilename = basename($Pfile_name); // $result = fopen($Pfile, "r"); // $Pfile = fread($result,$Pfile_size); // fclose($result); if (!$Pfile_type) // { $Pfile_type = "application/octet-stream"; // } $boundary = uniqid("").".koreaphp"; $mailheaders .= "MIME-Version: 1.0\r\n"; $mailheaders .= "Content-Type: multipart/mixed; boundary=\"$boundary\""; $text = "This is a multi-part message in MIME format.\r\n\r\n"; $text .= "--$boundary\r\n"; $text .= "Content-Type: text/html; charset=euc-kr\r\n"; $text .= "Content-Transfer-Encoding: 8bit\r\n\r\n"; $text .= $main. "\r\n\r\n"; $text .= "--$boundary\r\n"; $text .= "Content-Type: $Pfile_type; name=\"$Pfilename\"\r\n"; // $text .= "Content-Transfer-Encoding: base64\r\n\r\n"; $text .= ereg_replace( "(.{80})", "\\1\r\n",base64_encode($Pfile)); // mail($to_adminemail,$subject,$text,$mailheaders); } else { mail($to_adminemail,$subject,$main,$mailheaders); } /////////////////////////////////////////////////////////////////////////////////완료 메시지**** // echo"$to_adminemail 님에게 메일을 발송하였습니다."; echo (" "); } ############################################################################################################################### ?>