后端开发|php教程
nbsp,phpmail,gt,this,mail
后端开发-php教程
在本地用phpmailer发送邮件成功为什么收不到
$mail = $user_mail;
$randval = randStr(6,”ALL”);
$randval = md5($randval);
setcookie(‘mail_code2′,$randval,time()+172800,’/’);
$code = $mail.’_’.$randval;
$code = base64_encode($code);
setcookie(‘mail_form_code’,$code,time()+172800,’/’);
$url=site_url(‘forget/reset/mail/’.$mail.’/e/’.$randval);
$body = $this->load->view(‘mail/content2’, array(‘url’=>$url), true);
$body = eregi_replace(“[\]”,”,$body);
$this->phpmail->IsSMTP();
$this->phpmail->Host = “”;
$this->phpmail->SMTPAuth = true;
$this->phpmail->Host = “”;
$this->phpmail->Port = 25;
$this->phpmail->Username = “270687913@”;
$this->phpmail->Password = “asdfg314159”;
$this->phpmail->SetFrom(‘270687913@’, ‘First Last’);
$this->phpmail->AddReplyTo(“270687913@”,”First Last”);
$this->phpmail->MsgHTML($body);
$address = $mail;
echo $address;
$this->phpmail->AddAddress($address, “hello world!”);
//$this->phpmail->Send();
if(!$this->phpmail->Send()) {
echo “Mailer Error: ” . $this->phpmail->ErrorInfo;
} else {
echo “Message sent!”;
}
exit();
return true;
——解决方案——————–
phpmailer有debug模式,你开启debug模式让他报错误你就知道问题出在哪里了.
展示类网站源码,vscode代码审查,qqfor ubuntu,tomcat保存乱码,sqlite 子表的使用,社交分享插件,dj怎么和前端框架整合,梦到爬虫被吓醒,php调用父类的方法,机电seo优化案例,网站模板目录扫描,精美网页源码,java网页模板下载lzw