묻고답하기

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 남기남
eznz**** IIS에서의 봇 차단 문의 [2] 2019.10.01 by eznz****
현님v HTTP 500 내부 서버 오류 또는 404 에러 문제 [7] 2019.08.07 by 현님v
댑펑 추가 질문드립니다. 서버 접속 문제 [1] 2018.08.02 by Luatic™
마키치노 흰 화면, 404 에러 해결 방법 부탁드립니다.. 미치겠네요 ㅠㅠ [1] 2017.01.26 by 외인
ljk**** 외부페이지에서 Ajax로 등록처리시 &DB 가 존재하지 않아요  
펭구 글쓰기 관련 문의드립니다. [2] 2016.08.25 by 펭구
타마릭스 php 업그레이드 이후 500 에러 [1] 2015.12.14 by 타마릭스
namoo+ 모든 기능은 정상이나 회원가입 및 정보수정이 안 됩니다. ㅜ.ㅠ [9] 2015.11.08 by 빤뻔
과니 관리자 페이지 접속시 500 에러 디버깅 방법 문의 [3] file 2015.09.16 by 배워서남준다
김깔끔 홈페이지 접속하면 수시로 http 500 내부서버오류 가 뜹니다. [2] 2015.09.02 by 김깔끔
대떡 500에러가 떠요 [1] 2014.09.02 by 퍼니엑스이
시온의영광 http 오류 500.0 해결이 너무 어렵네요...  
Andyjo 관리자 접속시 인터널 서버 에러 500 오류가 납니다.  
비디 로그인을 할때 항상 에러가 납니다.  
비디 답변 부탁드려요~ 제로보드..로그인과 첨부파일문제입니다..  
레오나 로그인 후 500 에러, 파일첨부시 에러 메시지 500 [1] 2013.04.01 by Fidelity
Asaph 서버 HTTP 500 에러가 하루에 세네번씩 나네요.. 도와주세요.ㅠㅠ [1] 2012.11.23 by AppSeedKorea
가브리엘조 자체서버 소셜로그인 기능, http 500에러  
ajouphil 게시판에 준회원의 글 등록이 안되고 서버에러가 납니다. [2] 2012.11.01 by 똥똥
Dragon8 cache 폴더 삭제후 500 에러 급합니다 !! [1] 2012.09.26 by EnuX