채택완료

구글메일사용ㅜㅜ

2017-10-17 (화) 11:50:33 2,013

윈도우서버에서 메일서버말고

구글메일을 사용하려구요 ,,


61565dc706bbbb3504cb1a8f1dc3e4e9_1508208536_5819.png
 config.php 이렇게 수정후에


 mailer.php

 $mail = new PHPMailer(); // defaults to using php "mail()"

    if (defined('G5_SMTP') && G5_SMTP) {

        $mail->IsSMTP(); // telling the class to use SMTP

        $mail->Host = G5_SMTP; // SMTP server

        $mail->Port = 465;  // set the SMTP port 

        $mail->IsSMTP(); 

        $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 

아이디 비번부분 잘 작성했는데 메일발송이 전혀 안됩니다..


다른 부분또 수정할곳이있나요?

|

답변 1개

채택된 답변
+20 포인트

답변을 작성하려면 로그인이 필요합니다.