mailer.lib.php 에서
$mail = new PHPMailer(); // defaults to using php "mail()"
if (defined('G5_SMTP') && G5_SMTP) {
// $mail->IsSMTP(); // telling the class to use SMTP
// $mail->Host = G5_SMTP; // SMTP server
// if(defined('G5_SMTP_PORT') && G5_SMTP_PORT)
// $mail->Port = G5_SMTP_PORT;
$mail->IsSMTP(); // telling the class to use SMTP
$mail->SMTPSecure = "ssl";
$mail->SMTPAuth = true;
$mail->Host = 'smtp.naver.com'; // SMTP server
$mail->Port = 465;
$mail->Username = '네이버계정 아이디';
$mail->Password = '네이버계정 비밀번호';
}
user name과 password에는 제 개인계정 정보를 입력했고,
config.php에서는
// SMTP
// lib/mailer.lib.php 에서 사용
if(defined('G5_SMTP_USE_EXT') && G5_SMTP_USE_EXT == 1){
define('G5_SMTP', 'smtp.naver.com');
define('G5_SMTP_PORT', '465');
define('G5_SMTP_USEAUTH', true);
define('G5_SMTP_USESECURE', 'ssl');
define('G5_SMTP_USER', '아이디');
define('G5_SMTP_PASS', '비번');
}
define('G5_SMTP', '127.0.0.1');
define('G5_SMTP_PORT', '25');
이렇게 입력을 했는데, 이렇게 하는 방법이 맞을까요??
로컬 서버에서 테스트 메일 발송도 안되고, 게시판에서 메일발송 체크박스에 체크를 했음에도 불구하고 네이버계정으로 메일이 안오네요..