묻고답하기

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 남기남
Paul 1.7.4 업데이트 후에 잘못된 요청이라면서 관리자 페이지에 들어갈 수 없네요. [3] 2014.02.07 by Paul
쌤비 스케치북 게시판에서 제목 안나오게 하는 방법좀..  
개구리와올챙이 xe스터디 [1] 2014.02.07 by 마음의빈자리
정도길 기억이안납니다ㅠ 머리가 깍두기 된거같아요 [4] 2014.02.07 by 마음의빈자리
잉카러부 레이아웃등 각종 스킨의 디자인 수정은 어떻게 해야하나요 [4] 2014.02.07 by 마음의빈자리
Jiyoung540 제안!!* 전문가님들의 XE 지식인 고수 서비스(유료) 제공과 XE스터디 하는 거 어떠세요? [8] 2014.02.07 by 마음의빈자리
궁굼자 흐음... 문서페이지 등록이 안되네요;; [2] file 2014.02.07 by 궁굼자
아로미 구입한 레이아웃 설치가 이상해서요 [2] file 2014.02.07 by 아로미
아기나옹이 [재게시] 소스 수정좀 부탁 드립니다 [7] 2014.02.07 by 아기나옹이
진달래향기 안녕 하세요 질문 올려요. [4] file 2014.02.07 by 마음의빈자리
지오닷컴 1.7.x 버전에서 엮인글 기능 끌 수 없나요? [7] 2014.02.07 by 하늘봐
yuyan423 xe 설치후 특정 게시판 내용 사라지는 버그 file  
하늘봐 메뉴편집란 문의 [4] file 2014.02.07 by sjap97
이온디 서버 이전 후 나타난 문제  
잉카러부 레이아웃이 바뀌지를 않아요 [4] 2014.02.07 by 마음의빈자리
잉카러부 회원정보만 레이아웃이 디폴트로 가버립니다. [2] 2014.02.07 by 잉카러부
semiarmy 컨텐츠 위젯 오류 file  
조루나 1.7.4 업데이트 후, 첨부파일의 이미지를 인식 안 합니다. [2] 2014.02.07 by 조루나
동명보리차 배너위치 질문드립니다 [3] file 2014.02.07 by ForHanbi
송실장 1.7.4 로 업글후 이상증상들..(디자인설정, 소셜xe) [7] 2014.02.07 by 송실장