메일테스트 Network is unreachable (101)이라고뜨며 안됩니다.

메일테스트 Network is unreachable (101)이라고뜨며 안됩니다.

QA

메일테스트 Network is unreachable (101)이라고뜨며 안됩니다.

본문

2017-02-18 05:23:42 SMTP ERROR: Failed to connect to server: Network is unreachable (101) 2017-02-18 05:23:42 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting 

디버그내용입니다.

smtp.gmail.com 로 사용하고있고 포트는 465입니다.

 

config.php----------------

// SMTP

// lib/mailer.lib.php 에서 사용

//define('G5_SMTP',      '127.0.0.1');

define('G5_SMTP',      'smtp.gmail.com');

define('G5_SMTP_PORT', '465');

 

mailer.lib.php----------------

function mailer($fname, $fmail, $to, $subject, $content, $type=0, $file="", $cc="", $bcc="")

{

    global $config;

    global $g5;

 

    // 메일발송 사용을 하지 않는다면

    if (!$config['cf_email_use']) return;

 

    if ($type != 1)

        $content = nl2br($content);

 

    $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

        if(defined('G5_SMTP_PORT') && G5_SMTP_PORT)

            $mail->Port = G5_SMTP_PORT;

    }

    $mail->CharSet = 'UTF-8';

$mail->SMTPDebug  = 2;  

    $mail->From = $fmail;

$mail->SMTPAuth = true; // enable SMTP authentication 

    $mail->FromName = $fname;

    $mail->Subject = $subject;

    $mail->AltBody = ""; // optional, comment out and test

$mail->SMTPSecure = "ssl"; // sets the prefix to the servier 

    $mail->msgHTML($content);

    $mail->addAddress($to);

$mail->Username="제꺼이메일입니다.";

$mail->Password="*************";

    if ($cc)

        $mail->addCC($cc);

    if ($bcc)

        $mail->addBCC($bcc);

    //print_r2($file); exit;

    if ($file != "") {

        foreach ($file as $f) {

            $mail->addAttachment($f['path'], $f['name']);

        }

    }

    return $mail->send();

}

 

뭐가잘못됬을까요? 호스팅은닷홈에서하고 새벽까지잘되다가 닷홈점검이었는데

점검끝나고 갑자기안되네요.

 

포트 465 25 587 다써봤는데도 안됩니다.


이 질문에 댓글 쓰기 :

답변 1

답변을 작성하시기 전에 로그인 해주세요.
전체 6
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT