godaddy호스팅 사용하시는 분들! 메일링 문제 어떻게 해결하셨나요?

메일 함수에 내용을 아래와 같이 바꾸어는데 매일이 안오거나 너무 늦게 오는데 해결방법이 없을까요??

// 메일 보내기 (파일 여러개 첨부 가능)
// type : text=0, html=1, text+html=2
function mailer($fname, $fmail, $to, $subject, $content, $type=0, $file="", $cc="", $bcc="")
{
global $config;
global $g4;

// 메일발송 사용을 하지 않는다면
if (!$config[cf_email_use]) return;

$fname = "=?$g4[charset]?B?" . base64_encode($fname) . "?=";
$subject = "=?$g4[charset]?B?" . base64_encode($subject) . "?=";

$header = "";
$header .= "From: $fname <$fmail>\r\n";
$header .= "Reply-To: $fmail\r\n";
if ($cc) $header .= "Cc: $cc\r\n";
if ($bcc) $header .= "Bcc: $bcc\r\n";
$header .= "X-Mailer: PHP/" . phpversion();

if ($file != "") {
$boundary = uniqid(time());

$header .= "Content-type: MULTIPART/MIXED; BOUNDARY=\"$boundary\"\n\n";
$header .= "--$boundary\n";
}

if ($file != "") {
foreach ($file as $f) {
$header .= "\n--$boundary\n";
$header .= "Content-Type: APPLICATION/OCTET-STREAM; name=\"$f[name]\"\n";
$header .= "Content-Transfer-Encoding: BASE64\n";
$header .= "Content-Disposition: inline; filename=\"$f[name]\"\n";

$header .= "\n";
$header .= chunk_split(base64_encode($f[data]));
$header .= "\n";
}
$header .= "--$boundary--\n";
}
@mail($to, $subject, $content, $header);
}
|

댓글 4개

현재 잘 사용하고 있는 내용입니다.
약간 늦을때가 있지만 html 적용되어서 잘 옵니다.

// 메일발송 사용을 하지 않는다면
if (!$config[cf_email_use]) return;

$fname = "=?$g4[charset]?B?" . base64_encode($fname) . "?=";
$subject = "=?$g4[charset]?B?" . base64_encode($subject) . "?=";

$header = "Return-Path: <$fmail>\n";
$header .= "From: $fname <$fmail>\n";
$header .= "Reply-To: <$fmail>\n";
if ($cc) $header .= "Cc: $cc\n";
if ($bcc) $header .= "Bcc: $bcc\n";
$header .= "MIME-Version: 1.0\n";
$header .= "X-Mailer: SIR Mailer 0.92 (sir.co.kr) : $_SERVER[SERVER_ADDR] : $_SERVER[REMOTE_ADDR] : $g4[url] : $_SERVER[PHP_SELF] : $_SERVER[HTTP_REFERER] \n";

if ($file != "") {
$boundary = uniqid(time());

$header .= "Content-type: MULTIPART/MIXED; BOUNDARY=\"$boundary\"\n\n";
$header .= "--$boundary\n";
}

$type=2;

if ($type) {
$header .= "Content-Type: TEXT/HTML; charset=$g4[charset]\n";
if ($type == 2)
$content = nl2br($content);
} else {
$header .= "Content-Type: TEXT/PLAIN; charset=$g4[charset]\n";
$content = stripslashes($content);
}


if ($file != "") {
foreach ($file as $f) {
$header .= "\n--$boundary\n";
$header .= "Content-Type: APPLICATION/OCTET-STREAM; name=\"$f[name]\"\n";
$header .= "Content-Transfer-Encoding: BASE64\n";
$header .= "Content-Disposition: inline; filename=\"$f[name]\"\n";

$header .= "\n";
$header .= chunk_split(base64_encode($f[data]));
$header .= "\n";
}
$header .= "--$boundary--\n";
}
@mail($to, $subject, $content, $header);
}
마틴님 오류가 나오는데 소스 다시한번 확인 부탁드립니다
mailer.lib.php 파일 이메일로 보내드렸습니다.
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
14년 전 조회 1,021
14년 전 조회 955
14년 전 조회 1,875
14년 전 조회 1,243
14년 전 조회 1,023
14년 전 조회 1,254
14년 전 조회 798
14년 전 조회 1,752
14년 전 조회 1,257
14년 전 조회 2,575
14년 전 조회 994
14년 전 조회 729
14년 전 조회 949
14년 전 조회 977
14년 전 조회 1,576
14년 전 조회 1,544
14년 전 조회 682
14년 전 조회 735
14년 전 조회 1,125
14년 전 조회 1,515
🐛 버그신고