이메일 전송 성공이라고 나오는데 메일이 오지 않습니다.

이메일 전송 성공이라고 나오는데 메일이 오지 않습니다.

QA

이메일 전송 성공이라고 나오는데 메일이 오지 않습니다.

답변 1

본문

이메일 보내기 성공이라고 메세지가 표출되는데도 관리자 이메일로 이메일이 오지 않습니다

 

이메일테스트도 오지않고 이틀째인데 안오네요..

 

호스팅 무료 아닙니다 ! / 관리자이메일 변경/스팸메일함 확인해봤으나 되지가않습니다 ㅠㅠ

 

mailler.lib.php는 수정하지 않았으나 올려봅니다!

 

<?php

if (!defined('_GNUBOARD_')) exit;

 

include_once(G5_PHPMAILER_PATH.'/PHPMailerAutoload.php');

 

// 메일 보내기 (파일 여러개 첨부 가능)

// type : text=0, html=1, text+html=2

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->From = $fmail;

    $mail->FromName = $fname;

    $mail->Subject = $subject;

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

    $mail->msgHTML($content);

    $mail->addAddress($to);

    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();

}

 

// 파일을 첨부함

function attach_file($filename, $tmp_name)

{

    // 서버에 업로드 되는 파일은 확장자를 주지 않는다. (보안 취약점)

    $dest_file = G5_DATA_PATH.'/tmp/'.str_replace('/', '_', $tmp_name);

    move_uploaded_file($tmp_name, $dest_file);

    $tmpfile = array("name" => $filename, "path" => $dest_file);

    return $tmpfile;

}

?>

 

 

이 질문에 댓글 쓰기 :

답변 1

답변을 작성하시기 전에 로그인 해주세요.
전체 1
© SIRSOFT
현재 페이지 제일 처음으로