惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
博客园 - Franky
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
L
LangChain Blog
L
LINUX DO - 最新话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
AI
AI
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs

博客园 - 情义俩难全

使用shale实现jsf客户端验证(原创) ssh创建全过程 myeclipse 整合 jsf+spring2.0+hibernate3.0的问题 MyEclipse6.0 整合 Spring2.0 , Strust2 ,Hibernate3.0 - 情义俩难全 用myeclipse创建spring+hibernate工程时候的jar包冲突问题!!! netbeans6.5开发JSF+Hibernate的一个小例子(原创) JavaScript实现导出为Excel - 情义俩难全 - 博客园 配置 MyEclipse 的 WebLogic 9 服务器 jsp主次数据显示 jsp+javabean实现分页 浅谈“三层结构”原理与用意(转载) MySQL5.0中文问题及JDBC数据库连接和JSP汉字编码问题解决方法总结 用C#生成随机中文汉字验证码的基本原理 ASP.Net+XML打造留言薄 用ASP.NET部署三层架构 - 情义俩难全 - 博客园 .net环境下如何使用MySql数据库(原创) ASP与存储过程 - 情义俩难全 NBSI2内部功能实现大揭谜 存储过程入门与提高
PHPMAIL实例
情义俩难全 · 2011-07-11 · via 博客园 - 情义俩难全

<?php
//引入phpmailer类
require("phpmailer/class.phpmailer.php");

$mail = new PHPMailer();
$address = '9948425@qq.com'; //$_POST['address']; //发件人地址
$mail->IsSMTP();              // set mailer to use SMTP
$mail->Host = "smtp.163.com";     // specify main and backup server (邮局)
$mail->SMTPAuth = true;          // turn on SMTP authentication
$mail->Username = "hal_1983@163.com";   // SMTP username          (用户名)
$mail->Password = "xxxxx";        // SMTP password          (密码)
$mail->From = "hal_1983@163.com"; // 发件人邮箱(如果人家回复的话就是回这个邮箱)
$mail->FromName = "8比特管理员";     // 发件人
$mail->CharSet = "gb2312";         //指定字符集
$mail->Encoding = "base64";        //邮件的编码方式
$mail->AddAddress("$address", "");     //添加收件人邮箱和姓名
//$mail->AddReplyTo("", "");
//$mail->WordWrap = 50; // set word wrap to 50 characters
//$mail->AddAttachment("/var/tmp/file.tar.gz"); // add attachments
//$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // optional name
$mail->IsHTML(true); // set email format to HTML 设置邮件格式是HTML
$mail->Subject = "PHPMailer test"; // 邮件主题
// 邮件内容
$mail->Body = '<html><head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=GB2312"></head>
<body>
欢迎来到<a href="http://www.8bits.com">8比特</a> <br /><br />
感谢您注册为本站会员!<br /><br />
</body>
</html> ';
$mail->AltBody ="text/html"; //设置是在邮件正文不支持HTML的备用显示
if(!$mail->Send())
{
 echo "Message could not be sent. <p>";
 echo "Mailer Error: " . $mail->ErrorInfo;
 exit;
}
else
 echo '<script language="javascript">alert("Message has been sent");</script>';
?>