안녕하세요.
요즘 메일 전송하다보면 스팸으로 빠지는 경우가 많은데요.
그래서 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...
이런식으로 메세지가 나오고
관리자 페이지에서 메일발송 테스트를 하면
"토큰 정보가 올바르지 않습니다." 라고 나옵니다.
혹시 제가 뭘 잘못 설정한걸까요?
게시글 목록
| 번호 | 제목 |
|---|---|
| 24149 | |
| 24140 | |
| 24133 | |
| 24125 | |
| 24119 | |
| 24109 | |
| 24105 | |
| 24101 | |
| 24093 | |
| 24089 | |
| 24077 | |
| 24074 | |
| 24071 | |
| 24070 | |
| 24067 | |
| 24056 | |
| 24050 | |
| 24046 | |
| 24043 | |
| 24040 | |
| 24037 | |
| 24036 | |
| 24035 | |
| 24034 | |
| 24021 | |
| 24017 | |
| 24005 | |
| 24002 | |
| 23990 | |
| 23980 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기