PHP头条
热点:

php发送邮件方法二2.(SMTP传输SMTP类调用发送)


[html]
<?php 
require_once("email2.php");//此为php发送邮件方法二2.(SMTP传输SMTP类) 
/** 
*服务器信息 
*/ 
$MailServer = 'smtp.163.com';      //SMTP 服务器 
$MailPort   = '25';                  //SMTP服务器端口号 默认25 
$MailId     = 'anheng123@163.com';  //服务器邮箱帐号 
$MailPw     = 'xxxxxxxxxxx';                 //服务器邮箱密码 
 
/** 
*客户端信息 
*/ 
$Title      = '系统开发人员报告错误信息';        //邮件标题 
 
$bt="sadfsadf"; 
$_POST['url']="afasdfasfasfsaf"; 
$_POST['lianxi']="12312412"; 
$_POST['xiangxi']="说的话头isa而感觉撒改的"; 
$td=$subject.'<br>'.'标题:'.$bt.'<br>'.'url:'.$_POST['url'].'<br>'.'联系电话:'.$_POST['lianxi'].'<br>'.'详细内容:'.$_POST['xiangxi']; 
 
 
 
$Content    = $td;        //邮件内容 
$email      = www.2cto.com目标 接收者邮箱 
 
 
$smtp = new smtp($MailServer,$MailPort,true,$MailId,$MailPw); 
$smtp->debug = false; 
if($smtp->sendmail($email,$MailId, $Title, $Content, "HTML")){ 
     echo '邮件发送成功';            //返回结果 
} else { 
     echo '邮件发送失败';            //$succeed = 0; 

?> 
作者:Vericlongmore

www.phpzy.comtrue/phprm/16094.htmlTechArticlephp发送邮件方法二2.(SMTP传输SMTP类调用发送) [html] ?php require_once(email2.php);//此为php发送邮件方法二2.(SMTP传输SMTP类) /** *服务器信息 */ $MailServer = smtp.163.com; //SMTP 服务器 $MailPort = 25; //SMTP服...

相关文章

    暂无相关文章
相关频道:

PHP之友评论

今天推荐