30 lines
1.4 KiB
PHP
30 lines
1.4 KiB
PHP
<?
|
|
exit;
|
|
//메일보내기 샘플입니다.~~
|
|
include $_SERVER["DOCUMENT_ROOT"] . "/common/lib/phpmailer.inc.php";
|
|
|
|
//websiteSMTP($fromMail, $fromName, $replyMail, $mailTo, $mailToName, $mailCC, $mailBCC, $subject="No Subject", $body="", $attachFiles="", $debug="0", $smtpData, HTML 사용여부)
|
|
//websiteSMTP("보내는사람메일","보내는사람이름", "회신주소", "받는사람(1명)", 받는사람이름, "참조,;여러명", "숨은참조,;여러멍", $subject, $contents, 배열($sendFile,'이름'), "디버그모드1,2", smtpData(배열), HTML 사용여부)
|
|
|
|
$smtpData["HOST"] = "smtp.daum.net"; // Set the SMTP server to send through
|
|
$smtpData["USERNAME"] = 'testid'; // SMTP username
|
|
$smtpData["PASSWORD"] = 'testpass'; // SMTP password
|
|
$smtpData["PORT"] = 587; // TCP port to connect to
|
|
$smtpData["SSL"] = "Y";
|
|
|
|
$subject = "test2";
|
|
$contents = "test2";
|
|
$rcpt_email = "test@gmail.com";
|
|
$rcpt_name = "홍길동";
|
|
|
|
//$sendFile[] = array($_SERVER["DOCUMENT_ROOT"]."/uploaded/filename.pdf","원래이름.pdf");
|
|
$RS = websiteSMTP("website@website.co.kr","웹사이트", "website@website.co.kr", $rcpt_email, $rcpt_name, "", "", $subject, $contents, $sendFile, "2", $smtpData, "Y");
|
|
|
|
|
|
if($RS==true){
|
|
//메일 공지 일정 업데이트
|
|
echo true;
|
|
}
|
|
|
|
?>
|