관리자에 이메일을 등록하고
아이디/비밀번호찾기 를 했더니
이 메일은 [***]을 통해 발송된 메일이 아닙니다 라는 문구가 뜹니다..
이 부분은 어떻게 해결을 해줘야 하는 건가요 ...?
기존 그누보드5<99doci@wiztheplanet.com> 이렇게 보낼때는 위와같은 문구가
안 보였습니다..

답변 2개 / 댓글 1개
6년 전
관리자 이메일이 네이버면 naver가 제공하는 smtp로 메일 보내면 됩니다. 다음과 같이 mailer함수를 재정의 합니다.
Copy
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;
}
//@관리자 스팜 처리 안되게
if($fmail == 'xxxx_id@naver.com') {
$mail->Host = 'smtp.naver.com';
$mail->Port = 465;
$mail->Username = 'xxxx_id';
$mail->Password = 'xxxx_password';
$mail->SMTPAuth = true;
$mail->SMTPSecure = "ssl";
}
$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();
}
답변에 대한 댓글 1개
6년 전
devdev
6년 전
말그대로 입니다.
naver.com메일을 등록하셨다면 네이버 쪽 메일 서버에서 발송된것이 아니라서 저런 무구가 뜨는 겁니다.
제가 다른사람의 네이버 이메일로 메일을 발송하는 것과 다른것이 없습니다.
저런 무구가 안뜨려면 사이트 도메인과 같은 이메일을 사용하셔야 하겠습니다.
답변을 작성하려면 로그인이 필요합니다.
이경우 smtp.pushnews.io 라고 적어주면 될까요??
그런데 위 소스는 어느 페이지에 적어줘야 하는 건가요 ???