초간단 메일 발송
컨텐츠 정보
- 15,479 조회
- 10 추천
- 목록
본문
function SendMail ($fromaddress, $from_name, $toaddress, $to_name, $subject, $body, $headers)
{
$fp = popen ('/usr/sbin/sendmail -f'.$fromaddress.' '.$toaddress, "w");
if (!$fp) return false;
if ($to_name) fputs ($fp, "To: $to_name <$toaddress>\\n");
else fputs ($fp, "To: $toaddress\\n");
fputs ($fp, "From: $from_name <$fromaddress>\\n");
fputs ($fp, "Subject: $subject\\n");
fputs ($fp, $headers."\\n\\n");
fputs ($fp, $body);
fputs ($fp, "\\n");
pclose ($fp);
return true;
}
{
$fp = popen ('/usr/sbin/sendmail -f'.$fromaddress.' '.$toaddress, "w");
if (!$fp) return false;
if ($to_name) fputs ($fp, "To: $to_name <$toaddress>\\n");
else fputs ($fp, "To: $toaddress\\n");
fputs ($fp, "From: $from_name <$fromaddress>\\n");
fputs ($fp, "Subject: $subject\\n");
fputs ($fp, $headers."\\n\\n");
fputs ($fp, $body);
fputs ($fp, "\\n");
pclose ($fp);
return true;
}
관련자료
댓글 0
등록된 댓글이 없습니다.