📖
G5 HOOK 기능 을 이용한 네이버, 다음, 카카오, 지메일 등 외부메일 SMTP 전송
페이지 정보
본문
extend/user.extend.php 으로 아래 내용 생성[code]// SMTP
if (! function_exists('mailer_options_extend')) {
add_replace('mail_options', 'mailer_options_extend', G5_HOOK_DEFAULT_PRIORITY, 10);
function mailer_options_extend($mail, $fname, $fmail, $to, $subject, $content, $type, $file, $cc, $bcc)
{
$mail->From = 'username@naver.com';
$mail->Host = 'smtp.naver.com'; // SMTP server
$mail->Port = 465;
$mail->SMTPAuth = true;
$mail->SMTPSecure = "ssl";
$mail->Username = 'username';
$mail->Password = 'password';
return $mail;
}
}[/code]예제는 네이버 메일 입니다. 다음, 카카오, 지메일 등 적절히 수정해서 사용하시면 됩니다.
if (! function_exists('mailer_options_extend')) {
add_replace('mail_options', 'mailer_options_extend', G5_HOOK_DEFAULT_PRIORITY, 10);
function mailer_options_extend($mail, $fname, $fmail, $to, $subject, $content, $type, $file, $cc, $bcc)
{
$mail->From = 'username@naver.com';
$mail->Host = 'smtp.naver.com'; // SMTP server
$mail->Port = 465;
$mail->SMTPAuth = true;
$mail->SMTPSecure = "ssl";
$mail->Username = 'username';
$mail->Password = 'password';
return $mail;
}
}[/code]예제는 네이버 메일 입니다. 다음, 카카오, 지메일 등 적절히 수정해서 사용하시면 됩니다.
댓글목록
등록된 댓글이 없습니다.
![]() ![]() |