안녕하세요.
요즘 메일 전송하다보면 스팸으로 빠지는 경우가 많은데요.
그래서 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개
게시글 목록
| 번호 | 제목 |
|---|---|
| 24318 | |
| 24317 | |
| 24315 | |
| 24309 | |
| 24294 | |
| 24293 | |
| 24277 | |
| 24262 | |
| 24260 | |
| 24253 | |
| 24251 | |
| 24236 | |
| 24233 | |
| 24228 | |
| 24226 | |
| 24221 | |
| 24214 | |
| 24203 | |
| 24201 | |
| 24199 | |
| 24196 | |
| 24195 | |
| 24194 | |
| 24192 | |
| 24191 | |
| 24187 | |
| 24185 | |
| 24183 | |
| 24172 | |
| 24168 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기