sendmail 허용 안하는 웹호스팅에서 SMTP 사용하는 법

sendmail 허용 안하는 웹호스팅에서 SMTP 사용하는 법

QA

sendmail 허용 안하는 웹호스팅에서 SMTP 사용하는 법

본문

send_mail을 허용 안하는 웹호스팅에서 SMTP 사용하는 법을 알려 주세요.

 

config.php 파일에서 네이버 SMTP를 사용하기 위해서,

 

define('G5_SMTP', 'smtp.naver.com');
define('G5_SMTP_PORT', 465);
define('G5_SMTP_SECURE', 'ssl');
define('G5_SMTP_USER', '*** 개인정보보호를 위한 이메일주소 노출방지 ***');
define('G5_SMTP_PASS', '앱비밀번호'); //네이버 앱비밀번호 입력
define('G5_SMTP_TIMEOUT', 10);   //무한루프 방지

 

이렇게 설정해 봤는데도 메일이 전혀 들어오지 않네요.

 

사이트 무한루프 현상은 

define('G5_SMTP_TIMEOUT', 10);   //무한루프 방지 

이부분 시간만큼만 지체한 후 넘어갑니다.

 

config.php 파일에 위 내용 추가한것 말고는 mailer.lib.php 를 포함해서,

메일관련한 다른 파일들은 그누보드 원본파일 그대로 입니다.

mail() 함수나 sendmail 을 지원하지 않는 서버에서

그누보드 메일발송 기능을 사용하는 방법을 알고 싶습니다.

이 질문에 댓글 쓰기 :

답변 5

/lib/mailer.lib.php 에서 아래 내용으로 수정만하면 다른곳은 원본그대로 사용.


        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;
        }
=>
        if (defined('G5_SMTP') && G5_SMTP) {
            $mail->isSMTP();
            $mail->Host = 'smtp.naver.com';
            $mail->SMTPAuth = true;
            $mail->Username = '*** 개인정보보호를 위한 이메일주소 노출방지 ***'; // 전체 이메일 주소
            $mail->Password = '앱비밀번호'; // 일반 비번 아님! 
            $mail->SMTPSecure = 'ssl';
            $mail->Port = 465;
            $mail->Timeout = 30; // 타임아웃 설정 추가
            $mail->SMTPKeepAlive = true; // 연결 유지 옵션
            $mail->From = '*** 개인정보보호를 위한 이메일주소 노출방지 ***'; // 보내는 주소도 동일하게
            $mail->FromName = 'your name';
        }

Great guide for configuring Naver SMTP in GnuBoard! Ensure your hosting allows outbound connections on port 465. Double-check your Naver app password and email address are correct. Sometimes a simple Retro Bowl break helps debugging! Have you tried other SMTP ports (like 587 with TLS)? Also, confirm your server's firewall isn't blocking the connection.

Great guide for configuring Naver SMTP in GnuBoard! Ensure your hosting allows outbound connections on port 465. Double-check your Naver app password and email address are correct. Sometimes a simple Retro Bowl break helps debugging! Have you tried other SMTP ports (like 587 with TLS)? Also, confirm your server's firewall isn't blocking the connection.

답변을 작성하시기 전에 로그인 해주세요.
전체 129,672 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT