<?
require_once('include/global.php');
require_once('conf.inc.php');


// check
	if ($G['DINFO']['d_svc_external_pop3'] === 'N') {
		msg("외부 메일(POP3)를 사용할 수 없습니다.\\n\\n서버관리자에게 문의하여 주십시오.");
	}

	if (!$_GET['p3_no'])
		msg('올바른 URL로 접근하여 주십시오');

// [2006-03-08] 메일서버가 동작중인지 확인
	require_once('include/admin_lib.php');
	mail_server_check_limit();		
	
// data
	$pop3 = db_get_row("SELECT p3_server, p3_id FROM " . $TB['POP3'] . " WHERE p3_no='" . $_GET['p3_no'] . "' AND m_no='". $AUTH['auth_m_no'] . "'");
	$sql = " DELETE FROM " . $TB['POP3'] . " WHERE p3_no='" . $_GET['p3_no'] . "' AND m_no='". $AUTH['auth_m_no'] . "'";
	db_query($sql);
	


// 웹메일용 처리
	require_once('include/admin_lib.php');
	pop3_del($AUTH['auth_m_id'], $pop3['p3_server'], $pop3['p3_id']);


// end
	#msg("외부 메일이 삭제되었습니다.", 0);
	movepage('pop3.php');


require_once('include/global_end.php');
?>