<td width="67%">
<textarea name="bodytext" cols="40" rows="8"></textarea>
</td>
</tr>
<tr>
<td colspan="2" valign="top">
<div align="center">
<input type="submit" name="submit" value="发送信件">
<input type="reset" name="reset" value="重新填写">
</div>
</td>
</tr>
</table>
</form>
</body>
</html>
sendmail.php4
<?
//加载发送附件的类
require('html_mime_mail.inc');
if($update!=""){ //如果带附件
//上传附件
if(!file_exists("c:/ftptmp/".$myfile_name)){
if(copy($myfile,"c:/ftptmp/".$myfile_name)){
//读取附件
$attachment = fread($fp = fopen("c:/ftptmp/".$myfile_name, 'r'), filesize($myfile));
fclose($fp);
//unlink("c:/ftptmp/".$myfile_name);删掉
}
else {
echo "上传文件失败!";
exit();
}
}
else{
echo "文件重名!";
exit();
}
//新建一个类的实例,并加入附件
$mail = new html_mime_mail();
$mail->add_attachment($attachment, $myfile_name, 'application/octet-stream');
/*---------------------这段示范了如何发html信件---------------------------------------
$filename = 'ba
<textarea name="bodytext" cols="40" rows="8"></textarea>
</td>
</tr>
<tr>
<td colspan="2" valign="top">
<div align="center">
<input type="submit" name="submit" value="发送信件">
<input type="reset" name="reset" value="重新填写">
</div>
</td>
</tr>
</table>
</form>
</body>
</html>
sendmail.php4
<?
//加载发送附件的类
require('html_mime_mail.inc');
if($update!=""){ //如果带附件
//上传附件
if(!file_exists("c:/ftptmp/".$myfile_name)){
if(copy($myfile,"c:/ftptmp/".$myfile_name)){
//读取附件
$attachment = fread($fp = fopen("c:/ftptmp/".$myfile_name, 'r'), filesize($myfile));
fclose($fp);
//unlink("c:/ftptmp/".$myfile_name);删掉
}
else {
echo "上传文件失败!";
exit();
}
}
else{
echo "文件重名!";
exit();
}
//新建一个类的实例,并加入附件
$mail = new html_mime_mail();
$mail->add_attachment($attachment, $myfile_name, 'application/octet-stream');
/*---------------------这段示范了如何发html信件---------------------------------------
$filename = 'ba
| 对此文章发表了评论 |
