php代码
LANUX V1.0 蓝脑商务网站系统 适用于网店、公司宣传自己的品牌和产品。 系统在代码、页面方面设计简约,浏览和后台管理操作效率高。 此版本带可见即可得的html编辑器, 方便直观添加和编辑要发布的内容。 安装: 1.解压后,更换logo、分类名称、幻灯片的图片及名称和链接、联系我们等等页面。 2.将dbconfig.php里面的数据库配置更改为你的mysql数据库配置 3.将整个文件夹上传至
0
body = "<a href='http://www.baidu.com/' target='_blank'>点我重新生成密码</a>";
sendMail_smtp("xxxxxxxx@qq.com",'测试',$body);
function sendMail_smtp($smtpemailto,$mailsubject,$mailbody){
//error_reporting(7);
require_once 'Mail.php';
require_once 'Mail/mime.php';
$from = 'admin@xxx.com';
$to = $smtpemailto;
$password = 'xxxxxx';
$mail_config=array(
"host"=>"smtp.ym.163.com",
"port"=>25,
"auth"=>true,
"username"=>$from,
"password"=>$password,
"from"=>$from,
);
$hdrs = array(
'From'=>$from,
'To' => $to, //收信地址
'Subject'=>$mailsubject
);
$mime = new Mail_mime();
//$mime->setTXTBody($text);
//添加附件
//$mime->addHTMLImage('php.gif','image/gif','12345',true);
$mime->_build_params['html_charset'] = "utf-8";//设置编码格式
$mime->_build_params['head_charset'] = "utf-8";//设置编码格式
$mime->setHTMLBody($mailbody);
$body = $mime->get();
$hdrs = $mime->headers($hdrs);
$mail = Mail::factory('smtp',$mail_config);
$succ = $mail->send($to,$hdrs,$body);
if (PEAR::isError($succ))
{
//echo 'Email sending failed: ' . $succ->getMessage();
$err = 'Email sending failed: ' . $succ->getMessage();
$content = $to."\t".date('Y-m-d H:i:s')."\t ".$err." \r\n" ;
}
else
{
//$content = $to."\t".date('Y-m-d H:i:s')."\t Email sent succesfully \r\n" ;
return true;
}
}
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号