묻고답하기

xe 엔진으로 홈페이지를 구성하여 공부한지 2달 되어갑니다.

여러 시련 끝에 여기까지 왔는데, 아직도 멀지 쉽습니다.

나름 문제에 대한 해결책을 찾아보고 해결 방법을 찾지 못하여

이렇게 고수님께 도움을 요청합니다. 도움 부탁드립니다.

 

인증 메일 재발송을 하기 위해 

아래 게시글을 따라 설정을 줬습니다.

http://www.xpressengine.com/?mid=tip&page=2&document_srl=19201582


그런데, 나름 정확히 했다고 여겨지는데, 

설정을 주고 나면, 

사이트에 접속이 되질 않습니다. 

익스플로러. 크롬에서 접속을 하면, 

  • HTTP500 내부서버 오류 가 출력됩니다.



    1) 지메일 계정을 가지고 있고, 
        지메일 환경 설정에서  POP/IMAP 사용으로 설정을 주었습니다. 
    2) classes/mail/Mail.class.php 파일 소스를 변경 
       ㄱ)"Mail.class.php" 파일을 열어 상단에 
             옆의 내용을 추가해 주었습니다. require_once('PHPMailer/class.phpmailer.php');

       ㄴ)그리고 
    해당소스로 변경해 주었습니다. 

     function send() {
                $boundary = '----=='.uniqid(rand(),true);
                $this->eol = $GLOBALS['_qmail_compatibility'] == "Y" ? "\n" : "\r\n";

                $this->header = "Content-Type: multipart/alternative;".$this->eol."\tboundary=\"".$boundary."\"".$this->eol.$this->eol;
                $this->body = sprintf(
                    "--%s".$this->eol.
                    "Content-Type: text/plain; charset=utf-8; format=flowed".$this->eol.
                    "Content-Transfer-Encoding: base64".$this->eol.
                    "Content-Disposition: inline".$this->eol.$this->eol.
                    "%s".
                    "--%s".$this->eol.
                    "Content-Type: text/html; charset=utf-8".$this->eol.
                    "Content-Transfer-Encoding: base64".$this->eol.
                    "Content-Disposition: inline".$this->eol.$this->eol.
                    "%s".
                    "--%s--".
                    "",
                    $boundary,
                    $this->getPlainContent(),
                    $boundary,
                    $this->getHTMLContent(),
                    $boundary
                );

                $this->procCidAttachments();
                $this->procAttachments();

                $headers = sprintf(
                    "From: %s".$this->eol.
                    "%s".
                    "%s".
                    "%s".
                    "%s".
                    "MIME-Version: 1.0".$this->eol."",
                    $this->getSender(),
                    $this->messageId?("Message-ID: <".$this->messageId.">".$this->eol):"",
                    $this->replyTo?("Reply-To: <".$this->replyTo.">".$this->eol):"",
                    $this->bcc?("Bcc: ".$this->bcc.$this->eol):"",
                    $this->references?("References: <".$this->references.">".$this->eol."In-Reply-To: <".$this->references.">".$this->eol):""
                );
                $headers .= $this->header;
       //if($this->additional_params) return mail($this->getReceiptor(), $this->getTitle(), $this->body, $headers, $this->additional_params);
       //return mail($this->getReceiptor(), $this->getTitle(), $this->body, $headers);
       
       $MAILTO = $this->receiptor_email;
       $TITLE = $this->getTitle();
       $BODY = $this->body;
       $HEADER = $headers;
       $HEADER .= "\r\nMIME-Version: 1.0\r\n";
       $HEADER .= "Content-type: text/plain; charset=euc-kr\r\nContent-Transfer-Encoding: 8bit\r\nX-Priority: 1\r\nX-MSMail-Priority: High\r\n";
       $HEADER .= "From: $this->replyTo\r\n" . "Reply-To: $this->replyTo\r\n" . "X-Mailer: PHP/" . phpversion() . "\r\nX-originating-IP: " .$_SERVER['REMOTE_ADDR']. "\r\n";
       
       $mail             = new PHPMailer();
       $mail->addCustomHeader($HEADER); 
       $mail->IsSMTP(); // telling the class to use SMTP
       $mail->IsHTML(true);
       $mail->Host       = "www.congal.net"; // SMTP server
       //$mail->SMTPDebug  = 2;                     // enables SMTP debug information (for testing)
                    // 1 = errors and messages
                    // 2 = messages only
       $mail->ContentType="text/plain";
       $mail->CharSet   = "utf-8";
       $mail->SMTPAuth   = true;                  // enable SMTP authentication
       $mail->SMTPSecure = "ssl";                 // sets the prefix to the servier
       $mail->Host       = "smtp.gmail.com";      // sets GMAIL as the SMTP server
       $mail->Port       = 465;                   // set the SMTP port for the GMAIL server
       $mail->Username   = "pence@gmail.com";  // GMAIL username
       $mail->Password   = "123123";            // GMAIL password
       
       $mail->SetFrom(' pence@gmail.com ', 'pence');
       
       $mail->AddReplyTo("pence@naver.com", "pence");
       
       $mail->Subject    = $TITLE;
       
       $mail->AltBody    = $BODY; // optional, comment out and test
       
       $mail->MsgHTML($BODY);
       
       $address = $MAILTO;
       $mail->AddAddress($address, $address);
       
       $mail->Send();

    }

       ㄷ)서버에서 465포트 열어 놓았고    

[[[[ 위에 팁으로 구성하셨는데 에러가 발생한다고 한다면 다음사항을 체크해보시길 바랍니다.

1. OPENSSL 이 활성화 되었는지 ? =>phpinfo()에서 확인해보시면 됩니다.
2. 465포트가 열렸는지?  -->2008서버 R2 에서 465포트 열어둠
3. 지메일 계정의 IMAP,POP 설정이 활성화 되었는지?  -->사용으로 설정수정함
4. 지메일 계정이 블록되었는지? -->무슨 말인지? 이해 못함

추가적으로...
classes/mail/Mail.class.php 상단에   --> 아래 내용 추가
require_once('PHPMailer/class.phpmailer.php'); 를 붙이면 관리자 메뉴 관리의 메뉴들이 안보이는 에러가 발생합니다.
http://www.xpressengine.com/index.php?document_srl=19277785

classes/mail/Mail.class.php 상단에
class.phpmailer.php 소스를 전부 붙여넣기 하신다음에
public $PluginDir         = 'PHPMailer/'+ ';
위에처럼 수정하시면 에러가 발생하지 않습니다. ]]]] 

-->  PHPMailer/ class.phpmailer.php 파일 내용에서 public $PluginDir항목을 찾아  public $PluginDir         = 'PHPMailer/'+ '; 수정함


그러나 파일 수정 후 저장하고, 사이트에 접속하면, HTTP500 내부서버 오류 가 출력됩니다.


어떻게 해야 할까요? 며칠째 고생입니다. XE Core 1.5.2.5 버전을입니다. 

고수님들의 도움이 절실합니다. 도와주시면 감사하겠습니다. 

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
지오426 .htaccess --> 이 파일에 대해서.... [1] 2013.01.20 by LI-NA
CM(OEZ) NGINX 443 포트 에러쫌 해결 해 주세요/. [1] 2012.12.22 by 푸시아
꾸링 일부 회원의 스크랩 표시 오류  
EnterTM SSL + nginx 작업중인데 문제가 한가지 있어 질문드립니다. [1] 2012.09.15 by 푸시아
도전짱 XE Core 1.5.3.1.hotfix1 사용이후 HTTP 오류 500가 발생하고 있습니다. [2] 2012.08.26 by 도전짱
로드_1 [수정] 다시 올립니다 500 internal server error 부탁드립니다. [1] 2012.08.17 by 로드_1
zolaist xe Admin 페이지가 뜨지 않습니다.  
세로토닌 게시판 업그레이드 후 서버 오류가 납니다.  
조~사 사이트에서 메일 전송이 안됨!!!!  
조~사 인증 메일 재발송 안됨/ 비번 찾기 메일 전송도 안됨  
kuksys Error Code: HTTP Error, File name Message: 500 업로드시 애러 [1] 2012.04.02 by 데브위트™
9ooh 하위폴더에서 워드프레스 설치하기 file  
지정배359 초보입니다~ 좀 도와주세요~~ 관리자페이지 오류납니다. [1] 2012.03.15 by brendy
소리없이 관리자페이지와 모듈페이지 문제 / 몇몇분들도 ...  
소리없이 업데이트 후 관리자 페이지와 모듈 페이지가 사라졌습니다. 제발 도와주세요 [1] 2011.09.10 by 송동우
형자 제로보드4 -> XE 이전 관련 [1] 2011.08.12 by 막샷달인
루달스튼 xe 사이트 로드시에 500 에러 - error.log 첨부합니다.  
엔드라이프 첨부파일 128메가 오류 질문 HTTP 500 [2] 2011.06.08 by Happiness
모글리만세 Error Code : HTTP Error, 500 파일첨부 시, 오류메시지 팝업문제 [2] 2011.03.01 by ezi
아제나 파일 첨부시 500 에러가 발생하는데 admin은 발생하지 않습니다. [2] 2010.11.14 by 아제나