웹마스터 팁

인증메일이 가는곳이 있고 안가는 곳이 있고 그래서

메일 인증을 포기 하신분은 공개 SMTP를 이용한 방법을 참고하시면 좋을 듯합니다.

 

현재 제 사이트에서는 문제없이 작동하고 있습니다.

core 버전은 1.4.3.1입니다.

(http://www.keyzzler.com)

 

일단 메일러를 다운 받습니다.

워낙 유명한거니 아시는 분도 계실겁니다.

 

http://phpmailer.worxware.com/

위 사이트에서 PHPMailer를 다운 받으세요.

(PHP 버전에 맞춰서 다운 받으세요.)

 

다운 받은 메일러를 XE루드 폴더에 업로드합니다.

 

그리고 classes/mail/Mail.class.php를 수정합니다.

상단에 다음과 같이 넣어줍니다.

(이왕이면 최상단)

 

require_once('PHPMailer/class.phpmailer.php');


 

그리고 send()라는 함수를 찾으셔서 아래와 같이 수정합니다.

 

        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       = "yourdomain.com"; // 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   = "구글 이메일주소";  // GMAIL username
   $mail->Password   = "비밀번호";            // GMAIL password
   
   $mail->SetFrom('구글 이메일주소', '보내는 사람 이름');
   
   $mail->AddReplyTo("답장받을 이메일 주소", "답장받을 사람 이름");
   
   $mail->Subject    = $TITLE;
   
   $mail->AltBody    = $BODY; // optional, comment out and test
   
   $mail->MsgHTML($BODY);
   
   $address = $MAILTO;
   $mail->AddAddress($address, $address);
   
   $mail->Send();

}


메일러 다운받은 곳에가시면 gmail SMTP를 이용한 예제가 있습니다.

이해 안되시는 분은 예제를 참고하시고요...

 

※ 아마 파란(paran.com)도 공개 SMTP이니 적용하면 가능할 것 같습니다.

테스트는 안해봤는데...필요하신분은 적용해 보세요.

제목 글쓴이 날짜
SMTP 인증 회원가입 메일 인증 , 비밀번호 오류찾기 및 답변글 메일로 받기 [11] file FFHosting 2009.01.12
특정 도메인의 메일 주소로만 가입 인증 메일 보내기 [3] 박정욱 2009.03.28
인증메일 때문에 고생하시는 분 참고하세요. [17] 박용식 2010.10.14
성인인증 받는 소스입니다..... [17] q333 2003.01.12
PHP 인증 페이지를 만들자! - Lesson 1 수정본 #2 ☺[폐]허접-_- 2002.01.24
PHP 인증 페이지를 만들자! - Lesson 2 수정본 #1 [5] ☺[폐]허접-_- 2002.01.24
PHP 인증 페이지를 만들자! - Lesson 3 수정본 #1 [3] ☺[폐]허접-_- 2002.01.24
파일시스템에서 비밀번호 생성/수정/인증 [7] 두기두바 2002.01.10
웹 인증 보호, 윈도우 로그인 폼 이용 (authenticate) [9] file 둘리나라™ 2003.01.13
NZEO 이메일 인증 따라하기 [또 수정 --;] [44] file teslaMINT 2003.02.22
메일 인증시 기존 회원 전부 인증걸기;;; [4] teslaMINT 2003.03.04
홈페이지 관리자 모드 구축하기 (HTTP 인증, 중복 맞음) [10] file 9000㎒ 2003.11.01
PHP프로그램에 간단한 인증(로그인) 걸기. [15] Lepas 2004.08.09
[타키의 초보강좌]PHP 기초 강좌 제 1탄[패스워드 인증] [8] 타키 2004.10.23
htaccess를 활용하자 3탄! 사용자인증 [4] [쿨럭]블루엔젤 2003.01.23
qmail-1.03설치② (checkpassword 인증모듈) 비츠로 2003.02.28
qmail-1.03설치④ (vpopmail 인증모듈) 비츠로 2003.02.28
트래픽관리 Throttle-status 사용자 인증시키기 [1] Cksoft 2003.03.18
php 와 mysql 을 이용한 웹인증..(윈도우에서) 이성헌 2003.06.05
apache 서버에서 apache 인증 (윈도우에서 apm 설치후) 이성헌 2003.06.05