답변 3개 / 댓글 5개
채택된 답변
+20 포인트
<config.php>
define('G5_SMTP_USE_EXT', 1);
if(defined('G5_SMTP_USE_EXT') && G5_SMTP_USE_EXT == 0){
define('G5_SMTP', 'smtp.naver.com');
define('G5_SMTP_PORT', '587');
define('G5_SMTP_USEAUTH', true);
define('G5_SMTP_SECURE', 'TLS');
define('G5_SMTP_USER', '[email protected]');
define('G5_SMTP_PW', 'pwd');
}
------------------------------------------------------
mailer.lib.php
Copy
$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->SMTPAuth = true;
$mail->SMTPSecure = G5_SMTP_SECURE;
$mail->Username = G5_SMTP_USER;
$mail->Password = G5_SMTP_PW;
/* 추가 끝 */
}
저는 네이버를 사용 중입니다.
답변에 대한 댓글 3개
들레아빠님
답변이 답이네요. 감사합니다.
웹호스팅 받는 곳에서도 서버에 따라서 되는 계정도 있고 안되는 계정도 있더군요.
안되는 계정은 서버를 바꿔야 한다고 해서, 우선 이방법을 실험 했는데, 그렇게 안되던 메일 수신이 바로 됩니다.
감사합니다^^ㅜㅜ
답변을 작성하려면 로그인이 필요합니다.