그누보드 5 메일설정 정보
그누보드 5 메일설정본문
그누보드 5 메일 설정입니다.
/lib/mailer.lib.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
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);
-----------------------------------------------------
/lib/mailer.lib.php 수정후
$mail = new PHPMailer(); // defaults to using php "mail()"
if (defined('G5_SMTP') && G5_SMTP) {
$mail->isSMTP();
$mail->SMTPAuth = true;
$mail->SMTPSecure = "ssl";
$mail->Host = "smtp.gmail.com";
$mail->Port = 465;
$mail->Username = "메일주소";
$mail->Password = "비밀번호";
}
$mail->CharSet = 'UTF-8';
$mail->From = "보내는 사람 메일주소";
$mail->FromName = "보내는 사람 이름";
$mail->Subject = $subject;
$mail->AltBody = ""; // optional, comment out and test
$mail->msgHTML($content);
$mail->addAddress($to);
/lib/mailer.lib.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
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);
-----------------------------------------------------
/lib/mailer.lib.php 수정후
$mail = new PHPMailer(); // defaults to using php "mail()"
if (defined('G5_SMTP') && G5_SMTP) {
$mail->isSMTP();
$mail->SMTPAuth = true;
$mail->SMTPSecure = "ssl";
$mail->Host = "smtp.gmail.com";
$mail->Port = 465;
$mail->Username = "메일주소";
$mail->Password = "비밀번호";
}
$mail->CharSet = 'UTF-8';
$mail->From = "보내는 사람 메일주소";
$mail->FromName = "보내는 사람 이름";
$mail->Subject = $subject;
$mail->AltBody = ""; // optional, comment out and test
$mail->msgHTML($content);
$mail->addAddress($to);
추천
0
0
댓글 6개
왜 메일 설정을 변경한건가요?
아마도 메일서버가 설치되어 있지 않거나, 메일서버 오류인 경우, 외부 smtp서버를 이용하는 방법인듯 합니다.
감사합니다.
감사합니다.
지메일 메일설정
좋아요..잘쓰겠습니다.감사합니다.