通过html表格发电子邮件

如下:
?/******************************************************************************
Description: This is a simple script to send emails via a html-formto
different users Date: 1999-02-25 Author: amalesh kempf
amalesh@goatrance.deCreate this tableThe field what is for different
categoriesCREATE TABLE email_notify (ID int(11) DEFAULT ‘0’ NOT
NULL,What varchar(60) DEFAULT ‘0’ NOT NULL,Name varchar(60) DEFAULT ‘0’
NOT NULL,Email varchar(60) DEFAULT ‘0’ NOT NULL,timestamp
varchar(16),KEY (What),PRIMARY KEY (ID));To fill this table you might
create an insert
form*******************************************************************************///
Set this values:$strHost=localhost;$strUser=root;$strPassw
=;$strSender=you@domain.com;if (!$btnSendEmail){?The email will be added
automatically with Hello Name in the first line ofthe emailbody!brbrform
action=send_澳门新葡亰3522平台游戏,email.php3 enctype=application/x-
method=posttabletrtdSubject/tdtdinput name=strSubject
size=40/td/trtrtdBody/tdtdtextarea cols=40 name=strBody
rows=8wrap=PHYSICAL? echo $strBody
?/textarea/td/trtrtdCategory/tdtdselect name=strWhat?php // add you
categories here: ?option value=partyParty/option/select/td/tr/tableinput
name=btnSendEmail style=HEIGHT: 24px; WIDTH: 224pxtype=submit
value=Sende email/form?php}if (isset($btnSendEmail)){echo Send
Emailbr;// Create connection$intConID =
mysql_pconnect($strHost,$strUser,$strPassw);// Header$strHeader =
Return-Path: $strSender/nErrors-To: $strSender/nFrom:$strSender;//
SQL$strSQL = select name,email from email_notify where lcase(what)
=’$strWhat’;$intRes = mysql_query($strSQL,$intConID);echo Send Email
$strBodybr;// fetch arraywhile($saRow =
mysql_fetch_array($intRes)){$strEmail = $saRow[email];$strName =
$saRow[name];$strBodyComplete = Hello . $strName[$i] . !/n/n .
$strBody;//
Emailmail($strEmail,$strSubject,$strBodyComplete,$strHeader);//
Outputecho Send to $strNamebr;}}?