안녕하세요.
요즘 메일 전송하다보면 스팸으로 빠지는 경우가 많은데요.
그래서 HOOK 기능을 이용해서 SMTP 변경을 쉽게 할 수 있도록 했습니다.
[code]
// extend/user.extend.php 에 넣어 주시면 됩니다.
// 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]
댓글 15개
안녕하세요.
작성해주신 그대로 설정(네이버 메일주소, 아이디, 패스만 변경)한 후 업로드 했는데,
홈페이지 접속하면 홈페이지 상단에
if (! function_exists('mailer_options_extend')) { add_replace('mail_options', 'mailer_options_extend', G5_HOOK_DEFAULT_PRIORITY...
이런식으로 메세지가 나오고
관리자 페이지에서 메일발송 테스트를 하면
"토큰 정보가 올바르지 않습니다." 라고 나옵니다.
혹시 제가 뭘 잘못 설정한걸까요?
게시글 목록
| 번호 | 제목 |
|---|---|
| 22569 | |
| 22566 | |
| 22565 | |
| 22559 | |
| 22530 | |
| 22527 | |
| 22525 | |
| 22521 | |
| 22518 | |
| 22506 | |
| 22500 | |
| 22490 | |
| 22487 | |
| 22481 | |
| 22480 | |
| 22473 | |
| 22471 | |
| 22468 | |
| 22453 | |
| 22449 | |
| 22440 | |
| 22436 | |
| 22435 | |
| 22415 | |
| 22407 | |
| 22404 | |
| 22376 | |
| 22364 | |
| 22362 | |
| 22353 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기