decrypt($to); if (!chk_captcha()) { alert('자동등록방지 숫자가 틀렸습니다.'); } if (!preg_match("/([0-9a-zA-Z_-]+)@([0-9a-zA-Z_-]+)\.([0-9a-zA-Z_-]+)/", $to)){ alert_close('E-mail 주소가 형식에 맞지 않아서, 메일을 보낼수 없습니다.'); } $file = array(); for ($i=1; $i<=$attach; $i++) { if ($_FILES['file'.$i]['name']) $file[] = attach_file($_FILES['file'.$i]['name'], $_FILES['file'.$i]['tmp_name']); } $content = stripslashes($content); if ($type == 2) { $type = 1; $content = str_replace("\n", "
", $content); } // html 이면 if ($type) { $current_url = G5_URL; $mail_content = '메일보내기'.$content.''; } else $mail_content = $content; mailer($fnick, $fmail, $to, $subject, $mail_content, $type, $file); // 임시 첨부파일 삭제 if(!empty($file)) { foreach($file as $f) { @unlink($f['path']); } } //$html_title = $tmp_to . "님께 메일발송"; $html_title = '메일 발송중'; include_once(G5_PATH.'/head.sub.php'); alert_close('메일을 정상적으로 발송하였습니다.'); include_once(G5_PATH.'/tail.sub.php');