안녕하세요.
요즘 메일 전송하다보면 스팸으로 빠지는 경우가 많은데요.
그래서 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...
이런식으로 메세지가 나오고
관리자 페이지에서 메일발송 테스트를 하면
"토큰 정보가 올바르지 않습니다." 라고 나옵니다.
혹시 제가 뭘 잘못 설정한걸까요?
게시글 목록
| 번호 | 제목 |
|---|---|
| 23966 | |
| 23963 | |
| 23953 | |
| 23949 | |
| 23938 | |
| 23935 | |
| 23933 | |
| 23928 | |
| 23919 | |
| 23918 | |
| 23917 | |
| 23910 | |
| 23902 | |
| 23901 | |
| 23897 | |
| 23894 | |
| 23893 | |
| 23891 | |
| 23885 | |
| 23872 | |
| 23870 | |
| 23862 | |
| 23859 | |
| 23853 | |
| 23845 | |
| 23838 | |
| 23827 | |
| 23819 | |
| 23805 | |
| 23801 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기