gmail로 메일 발송시 제목 깨지는 오류 수정

This commit is contained in:
chicpro
2013-03-18 13:52:53 +09:00
parent af32c0e018
commit 7956b4f02f

View File

@ -11,8 +11,10 @@ function mailer($fname, $fmail, $to, $subject, $content, $type=0, $file='', $cc=
// 메일발송 사용을 하지 않는다면
if (!$config['cf_email_use']) return;
$fname = "=?$g4[charset]?B?" . base64_encode($fname) . "?=";
$subject = "=?$g4[charset]?B?" . base64_encode($subject) . "?=";
//$fname = "=?$g4[charset]?B?" . base64_encode($fname) . "?=";
//$subject = "=?$g4[charset]?B?" . base64_encode($subject) . "?=";
$fname = "=?utf-8?B?" . base64_encode($fname) . "?=";
$subject = "=?utf-8?B?" . base64_encode($subject) . "?=";
//$g4[charset] = ($g4[charset] != "") ? "charset=$g4[charset]" : "";
$header = "Return-Path: <$fmail>\n";
@ -31,11 +33,11 @@ function mailer($fname, $fmail, $to, $subject, $content, $type=0, $file='', $cc=
}
if ($type) {
$header .= "Content-Type: TEXT/HTML; charset=$g4[charset]\n";
$header .= "Content-Type: TEXT/HTML; charset=utf-8\n";
if ($type == 2)
$content = nl2br($content);
} else {
$header .= "Content-Type: TEXT/PLAIN; charset=$g4[charset]\n";
$header .= "Content-Type: TEXT/PLAIN; charset=utf-8\n";
$content = stripslashes($content);
}
$header .= "Content-Transfer-Encoding: BASE64\n\n";