회원정보 찾기 이메일이 도착하지 않습니다 채택완료
localhost에서 그누보드5.4를 사용중입니다
회원정보 찾기에서 이메일을 입력하고 확인을 눌렀는데, 메일이 오지 않습니다.
(지메일과 네이버 메일 둘다 안되네요)
어떻게 수정해야 하나요?
lib\mailer.lib.php 코드
</p>
<p><?php
if (!defined('_GNUBOARD_')) exit;</p>
<p>include_once(G5_PHPMAILER_PATH.'/PHPMailerAutoload.php');</p>
<p>// 메일 보내기 (파일 여러개 첨부 가능)
// type : text=0, html=1, text+html=2
function mailer($fname, $fmail, $to, $subject, $content, $type=0, $file="", $cc="", $bcc="")
{
global $config;
global $g5;</p>
<p> // 메일발송 사용을 하지 않는다면
if (!$config['cf_email_use']) return;</p>
<p> if ($type != 1)
$content = nl2br($content);</p>
<p> $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();
}</p>
<p>// 파일을 첨부함
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;
}
?></p>
<p>
댓글을 작성하려면 로그인이 필요합니다.
답변 4개
답변을 작성하려면 로그인이 필요합니다.
로그인전체 질문 목록
답변대기
답변대기
답변대기
답변대기
답변대기
답변대기
답변대기
답변대기
채택
답변대기
답변대기
답변대기
답변대기
채택
채택
답변대기
답변대기
답변대기
채택