深圳市一览网络股份有限
公司
ShenZhen Elanw Network
Co.,Ltd.
地址:南山科技园南区数字技术园
B2 栋 4A
Add: Room A,4th Floor,Block
B2,Digi-Tech Park ,
电话(Tel):0755-86133725
传真(Fax):0755-22632616
网址
(Web):www.YL1001.com
->Subject = "=?UTF-8?
B?".
base64_encode
(
$subject
)."?=";
// optional, comment out and test
->AltBody = "To view the message, please use an HTML compatible email viewer!";
->MsgHTML(
$body
);
//$mail->AddAttachment("images/phpmailer.gif"); // attachment
//$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment
if
(!
->Send()) {
//echo "Mailer Error: " . $mail->ErrorInfo;
}
else
{
//echo "Message sent!";
}
}
使用的时候只要引入两个
PHP 类,然后自己写个方法就 OK 了,两个类很小,发送邮件速度也很快。
PHPMailer 是一个功能强大的邮件类,其主要功能特点:
支持邮件
s/mime 加密的数字签名
支持邮件多个
TOs, CCs, BCCs
and
REPLY-TOs
可以工作在任何服务器平台,所以不用担心
WIN 平台无法发送邮件的问题的
支持文本
/HTML 格式邮件
可以嵌入
image 图像
对于邮件客户端不支持
HTML 阅读的进行支持
功能强大的发送邮件调试功能
debug
自定义邮件
header
冗余
SMTP 服务器支持
支持
8bit, base64, binary,
and
quoted-printable 编码
文字自动换行
支持多附件发送功能
支持
SMTP 服务器验证功能
在
Sendmail, qmail, Postfix, Gmail, Imail, Exchange 等平台测试成功
提供的下载文件中,包括内容详细的说明文档及示