** 用PHP 发邮件例程 ,欢迎参考 **
/ S# G5 e$ M+ [& d, _# i8 y- c/ J
目前我采用的空间是PHP+MYSQL类型的,有关于PHP方面的编程问题,欢迎一起讨论
我写了一段PHP邮件例程也在下面,供参考:
. ~3 D) v3 s) E+ D' \) P0 O
例程如下: # T3 k( s/ n# b3 R, C- r& @
<? ! V! I: R( M5 E+ F
if($send){ : ~, ~7 w3 D9 t8 g; L. ?
$hearer="From
from\nReply-T$from\nX-Mailer: PHP/".phpversion()."\nContent-Type:text/html";
$result=mail($to,$subject,$body,$hearer); 7 `) m$ S9 `; p
if($result) & g4 G1 Y+ [, }+ o
echo "邮件已成功发送";
} ( V. d; T' g- `8 O- n
?> 6 X/ s6 x+ R6 |' ?. }
<html>
<body> . [+ s% W) T' V! A+ e: F
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#6699FF"> 9 B# u8 P, Z9 x9 D
<form method="post">
<tr bgcolor="#E7E7CB"> & \, y1 x) l# z4 ^/ b4 n: o0 J5 j
<td width="20%" height="26">发件人:</td>
<td width="80%"><input name="from" type="text"></td>
</tr> + O3 T& U% v0 T; t( h& ]% J
<tr bgcolor="#E7E7CB">
<td height="25">收件人:</td>
<td><input name="to" type="text"></td>
</tr> ) ^+ Y' i! S( G5 A
<tr bgcolor="#E7E7CB"> 7 O/ h$ X: Y; k9 m2 {. M4 I
<td height="24">邮件标题:</td>
<td><input name="subject" type="text" size="50"></td>
</tr>
<tr bgcolor="#E7E7CB">
<td height="27">邮件内容:</td> 3 W5 t3 f6 j% T) l7 C: f
<td><textarea name="body" cols="60" rows="10"></textarea></td>
</tr>
<tr bgcolor="#E7E7CB"> $ c/ ?4 G+ D( }4 \" \
<td height="28"> </td>
<td> 0 y% W# v1 }5 V3 U4 M* Y
<input type="hidden" value="1" name="send">
<input type="submit" name="Submit" value="提交"> . v( B) C8 O# q; f# w+ M9 m
<input type="reset" name="Submit2" value="重置"></td>
</tr>
</form> ( W& x( P- a: c: l8 v# p
</table>
</body>
</html>
-------------------------------------------------------------------------------- & m' T! r' @+ p
时代互联 (www.now.net.cn/host) 的PHP 虚拟主机性能: * S2 T& c1 o: H6 Z/ }- e
/ _6 |* q& z/ [+ k' H/ X/ e4 O
PHP4.3.6 GD2.1x mhash iconv 支持Zend 加速及加密 XML kerberos IMAP ZLIB CURL ( `9 a: S, p9 v' f0 b
Apache2 PHP 内核整合 MySQL4.0.17 带phpMyAdmin 管理后台 支持网站访问统计 5 O* Q8 ?1 U3 {+ I! P
★送免费的留言板和计数器 ,流量访问系统 9 L, G- p+ a0 u$ O- ?2 E8 t( D
推荐类型:
* w3 O# k6 U3 ?+ r: `+ D
商务型B+.CN域名 送800M 空间邮箱 1300元/年
点击: http://now.net.cn/host/commerce.net?PHPSESSID=aca5c80915ad9bcc097e352cf57e9d61
# |1 H% u0 B7 [. L; d. o虚拟专用型B+.CN域名+国际顶级域名 送2000M VIP 企业邮局 配置MYSQL数据库 3800元/年 - r; d" M/ P, }' f 订购地址:/ P* L$ h1 U0 l* L0 I, y http://now.net.cn/host/vps.net?PHPSESSID=aca5c80915ad9bcc097e352cf57e9d61 ------------------------------------------------------------------------------- 4 W) l# C% s" t3 q# r' _1 G$ a 虚拟主机的优势: http://now.net.cn/news/MessView.net?IDMessage=4607 全球免费咨询电话,请点击 http://www.now.net.cn/customer/moreline.net + t( b# G% y0 T; q Q Q在线咨询:188092185 108786612 ^2 h" ?0 `& l' F$ g, r- K" y TEL:0756-3813159 3813160
| 欢迎光临 数学建模社区-数学中国 (http://www.madio.net/) | Powered by Discuz! X2.5 |