묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
http://www.response-o-matic.com/ 사용법좀 [폼메일관련]
2005.02.08 03:14
폼메일을 사용하려하는데
일단 급해서
알아본게
http://www.response-o-matic.com
이곳입니다..
근데 여기 영문이라서.. ;ㅁ;.
사용법 아시는분좀 가르쳐주세요..
일단 급해서
알아본게
http://www.response-o-matic.com
이곳입니다..
근데 여기 영문이라서.. ;ㅁ;.
사용법 아시는분좀 가르쳐주세요..
댓글 2
-
愛のつむじ風
2005.02.08 22:25
호오.. 좋은 곳이군요. +_+ -
이현석
2005.02.11 15:12
php school에서 펌...
^____^
<?php
if($mode==sendmail)
{
$mailheaders .= "Return-Path: $fromrn";
$mailheaders .= "From: $rn <$from>rn";
$mailheaders .= "X-Mailer: PHP Mailerrn";
if ($userfile && $userfile_size)
{
$filename=basename($userfile_name);
$result=fopen($userfile, "r");
$file=fread($result,$userfile_size);
fclose($result);
if ($userfile_type == "")
{
$userfile_type = "application/octet-stream";
}
$boundary = uniqid( "part");
$mailheaders .= "MIME-Version: 1.0rn";
$mailheaders .= "Content-Type: multipart/mixed; boundary="$boundary"";
if($htmlcheck==Y) $mailheaders .= "nContent-Type:text/html";
$bodytext = "This is a multi-part message in MIME format.rnrn";
$bodytext .= "--$boundaryrn";
$bodytext .= "charset=euc-krrn";
// $bodytext .= "Content-Transfer-Encoding: 8bitrnrn";
$bodytext .= nl2br(stripslashes($body)) . "rnrn";
$bodytext .= "--$boundaryrn";
$bodytext .= "Content-Type: $userfile_type; name="$filename"rn";
$bodytext .= "Content-Transfer-Encoding: base64rnrn";
$bodytext .= ereg_replace( "(.{80})", "\1rn",base64_encode($file));
$bodytext .= "rn--$boundary" . "rn";
}
//
//
else
{
$bodytext = stripslashes($body);
}
$result = mail($to,$subject,$bodytext,$mailheaders);
if($result)
{
echo " .";
}
else
{
echo " ";
}
}
else
{
echo("
<html>
<head>
<title>File Attach </title>
</head>
<body bgcolor=#FFFFFF>
<table border=1>
<form action=$PHP_SELF method=post enctype='multipart/form-data'>
<input type=hidden name=mode value=sendmail>
<tr>
<td> </td>
<td><input type=text name=from></td>
</tr>
<tr>
<td> </td>
<td><input type=text name=to></td>
</tr>
<tr>
<td></td>
<td><input type=text name=subject></td>
</tr>
<tr>
<td> </td>
<td><input type=file name=userfile></td>
</tr>
<tr>
<td> </td>
<td>
<input type=checkbox name=htmlcheck value=Y>HTML<br>
<textarea name=body cols=30 rows=10></textarea>
</td>
</tr>
<tr>
<td colspan=2 align=center><input type=submit></td>
</tr>
</form>
</table>
</body>
</html>
");
}
?>