<?php
error_reporting(E_ALL);

ini_set("display_errors", 1);



header('Content-Type: text/html; charset=UTF-8');
date_default_timezone_set('Asia/Seoul');
$server_root_path = $_SERVER['DOCUMENT_ROOT']."/Admin";
include $server_root_path."/submit_process/sendmail_config.php";
include $server_root_path."/submit_process/sendmail_curl_getNpost.php";


$ctcountry = "kr"; // VPN IP 국가 설정
$ctemailid = $member_id; // 사용자 아이디
$passwd = strtolower(substr(uniqid(),-8));
$datetime_start = date("Y-m-d H:i:s");
$datetime_end_tmp = date("Y-m-d") . " 00:00:00";
$datetime_end_tmp = date("Y-m-d",strtotime($datetime_end_tmp . " +1days"));
$datetime_end = substr($datetime_end_tmp,0,10) . " 23:59:59";

// 파일내용 변수에 담기
ob_start();
include $server_root_path."/submit_process/sendmail_custom.php";
$mail_content = ob_get_contents();  // 고객용 본문($mail_content) 저장
ob_end_clean();

$from = $FROM_EMAIL;
$to = $TO_EMAIL_ADMIN;
$subject = $TITLE_ADMIN;
$message = $mail_content;
$headers = "From:" . $FROM_EMAIL. "\r\n" . 'Reply-To: ' . $FROM_EMAIL . "\r\n" . "Content-type:text/html;charset=UTF-8" . "\r\n" . 'X-Mailer: PHP/' . phpversion();

$MAILSEND_URL = "https://VPNLink.KR/__extra_mail_send/sendmail_exec.php";
// get함수 호출
//get('$MAILSEND_URL', array('from'=>$from, 'to'=>$to, 'subject'=>$subject, 'message'=>$message, 'headers'=>$headers));
// post함수 호출
echo post($MAILSEND_URL, array('from'=>$from, 'to'=>$to, 'subject'=>$subject, 'message'=>$message, 'headers'=>$headers));


?>


