묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
email 보내기!!!
2002.11.29 07:23
아래와 같은 함수를 Zero board에서 따왔는데
작동이 안되네요..
에러 메세지는 ....
server error
에러 line은 mail($recipient , $subject , $comment , $headers);
== 함수==
function sendemail() {
$to="누구@yahoo.com";
$to_name="누구";
$type=1;
$comment="happy?";
$from="썸바디.com";
$from_name="썸바디";
$subject="Your password is 뭐뭐";
$recipient = "$to_name <$to>";
if($type==1) $comment = nl2br($comment);
$headers = "From: $from_name <$from>n";
$headers .= "X-Sender: <$from>n";
$headers .= "X-Mailer: PHP ".phpversion()."n";
$headers .= "X-Priority: 1n";
$headers .= "Return-Path: <$from>n";
if(!$type) $headers .= "Content-Type: text/plain; ";
else $headers .= "Content-Type: text/html; ";
$headers .= "charset=euc-krn";
//if($cc) $headers .= "cc: $ccn";
//if($bcc) $headers .= "bcc: $bcc";
$comment = stripslashes($comment);
$comment = str_replace("nr","n", $comment);
mail($recipient , $subject , $comment , $headers);
}
고맙습니다..
작동이 안되네요..
에러 메세지는 ....
server error
에러 line은 mail($recipient , $subject , $comment , $headers);
== 함수==
function sendemail() {
$to="누구@yahoo.com";
$to_name="누구";
$type=1;
$comment="happy?";
$from="썸바디.com";
$from_name="썸바디";
$subject="Your password is 뭐뭐";
$recipient = "$to_name <$to>";
if($type==1) $comment = nl2br($comment);
$headers = "From: $from_name <$from>n";
$headers .= "X-Sender: <$from>n";
$headers .= "X-Mailer: PHP ".phpversion()."n";
$headers .= "X-Priority: 1n";
$headers .= "Return-Path: <$from>n";
if(!$type) $headers .= "Content-Type: text/plain; ";
else $headers .= "Content-Type: text/html; ";
$headers .= "charset=euc-krn";
//if($cc) $headers .= "cc: $ccn";
//if($bcc) $headers .= "bcc: $bcc";
$comment = stripslashes($comment);
$comment = str_replace("nr","n", $comment);
mail($recipient , $subject , $comment , $headers);
}
고맙습니다..