诚恳请求PHP 发多媒体邮件 就是能把HTML格式的邮件发出去 100小谢各位 http://pear.php.net/package/Mail_Mimehttp://pear.php.net/package/Net_SMTP 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这个有点复杂,你首先要先学会发送有附件的邮件的方法。学习之后就很容易了,html带图片和声音的代码:仅供参考<?$gahob[mailto] = "\"IT_Info\" <[email protected]>";$gahob[mailfrom] = "\"IT_James\" <[email protected]>";$gahob[subject] = "Test_SendMail";$NextPart_1 = "----=_NextPart_".md5(uniqid(rand())); $NextPart_2 = "----=_NextPart_".md5(uniqid(rand())); $mailfile = "001.gif";$fp = fopen($mailfile, "r"); $read = fread($fp, filesize($mailfile)); $read = base64_encode($read); $read = chunk_split($read);$gahob[message] = "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\"><title>Midland</title></head><body><img src=\"cid:$NextPart_1\"></html>"; $gahob[headers] = "From: $gahob[mailfrom]MIME-Version: 1.0Content-Type: multipart/related; type=\"multipart/alternative\"; boundary=\"$NextPart_1\""; $gahob[message2] = "--$NextPart_1Content-Type: multipart/alternative; boundary=\"$NextPart_2\"--$NextPart_2Content-Type: text/plain; charset=\"gb2312\"Content-Transfer-Encoding: base64--$NextPart_2Content-Type: text/html; charset=\"gb2312\"Content-Transfer-Encoding: 8bit$gahob[message]--$NextPart_2----$NextPart_1Content-Type: image/gif; name=\"$filename\"Content-Transfer-Encoding: base64Content-ID: <$NextPart_1>$read--$NextPart_1--"; if(mail($gahob[mailto], $gahob[subject], $gahob[message2], $gahob[headers]))echo "OKOK";?> 欢迎加入PHP WAP QQ群8352641 大家一起交流,一起进步.共同发展 echo(),print(),print_r(),var_dump()的区别 请教一下 QQ 空间的分段加载技术是如何实现的? fckeditor设置问题 zend studio里面怎样将字体放大点? 关于显示数据库里的标题 如何定义私有函数 谁能用html/asp/php做这个东西?? 问:关于php中的mail()函数 跨域的session传递 ASP 与 PHP 与 JSP 一个时间的问题 真怪哦.PHP连接数据库
html带图片和声音的代码:仅供参考
<?
$gahob[mailto] = "\"IT_Info\" <[email protected]>";
$gahob[mailfrom] = "\"IT_James\" <[email protected]>";
$gahob[subject] = "Test_SendMail";
$NextPart_1 = "----=_NextPart_".md5(uniqid(rand()));
$NextPart_2 = "----=_NextPart_".md5(uniqid(rand()));
$mailfile = "001.gif";
$fp = fopen($mailfile, "r");
$read = fread($fp, filesize($mailfile));
$read = base64_encode($read);
$read = chunk_split($read);$gahob[message] = "<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">
<title>Midland</title>
</head><body>
<img src=\"cid:$NextPart_1\">
</html>";
$gahob[headers] = "From: $gahob[mailfrom]
MIME-Version: 1.0
Content-Type: multipart/related;
type=\"multipart/alternative\";
boundary=\"$NextPart_1\""; $gahob[message2] = "--$NextPart_1
Content-Type: multipart/alternative;
boundary=\"$NextPart_2\"
--$NextPart_2
Content-Type: text/plain;
charset=\"gb2312\"
Content-Transfer-Encoding: base64
--$NextPart_2
Content-Type: text/html;
charset=\"gb2312\"
Content-Transfer-Encoding: 8bit$gahob[message]--$NextPart_2----$NextPart_1
Content-Type: image/gif;
name=\"$filename\"
Content-Transfer-Encoding: base64
Content-ID: <$NextPart_1>$read--$NextPart_1--"; if(mail($gahob[mailto], $gahob[subject], $gahob[message2], $gahob[headers]))
echo "OKOK";
?>