웹마스터 팁

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

메일 인증을 포기 하신분은 공개 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이니 적용하면 가능할 것 같습니다.

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

제목 글쓴이 날짜
IIS에서 HTTPS를 사용하기 위한 SSL설정 (letsencrypt 인증서 설치, 갱신) file ehii 2016.04.13
가입 메일 인증 SMTP 안되시는 분들 참고하세욤~ 네이버 메일 서버 사용. [4] file 테나 2012.12.08
rsync 와 ssh root 접속을 막고 인증키로만 백업하기 마루디자인 2015.11.25
member 모듈 메일인증을 사용할때 모바일 기본스킨에서 회원가입 후 이메일 발송 안내 띄우기 [2] file 후하니 2015.08.01
간단하게 외부 SMTP 로 인증메일 보내기. [1] file AJKJ 2014.07.22
php 5.6에서 인증메일 SMTP 연결에 실패할때.. file 루비스코 2015.03.31
인증메일이 안올경우 - 팁이라고 해야할지...소개라고 해야할짐 모르지만 [2] socialskyo 2015.03.07
인증메일을 gmail의 smtp로 보내기 [29] showjean 2012.07.17
회원가입 인증메일 Gmail 설정해도 메일 안 올 때 저는 이렇게 했습니다. [12] file 마키치노 2014.11.06
네이버 SMTP로 인증메일 보내기 [12] Neder 2013.08.26
특정 도메인 가입 않되게 (인증메일 관련) 컴박살 2014.08.06
인증메일 안가는 문제- 완전 간단 해결 꿈섬 2014.07.27
이메일인증 Error 한방정리 참고해보세요. [4] 애드바이러스 2014.02.12
이메일 주소로 계정 찾기시 잘못된 계정 인증요청이라고 뜰때 임시 대처법 file 루비스코 2014.05.10
아이디 계정때도 이메일 변경시 재인증 메일 발송하기 [1] 혼ME 2013.06.19
메일링 가입 인증 폼 부터 ..가입인증 메일 제목 가입인증 메일 코드 부분의 에러로 , msg_confirm_account_title 메일 주소가 이렇게 표기되어 오던 [3] file 애드바이러스 2013.09.02
회원가입 인증메일 제목 msg_confirm_account_title 오류 해결방법 [2] 뒤뒤 2013.06.27
SMTP 인증 회원가입 메일 인증 , 비밀번호 오류찾기 및 답변글 메일로 받기 [11] file FFHosting 2009.01.12
Startssl 무료인증서 백업 복구 성공기!! [2] 제이엔지 2013.01.15
인증메일 때문에 고생하시는 분 참고하세요. [17] 박용식 2010.10.14