[password key=201752135435]

[code]functions.php[/code]文件加入以下代码:

  1. //使用smtp发送邮件(请根据自己使用的邮箱设置SMTP)  
  2. add_action(‘phpmailer_init’, ‘mail_smtp’);  
  3. function mail_smtp( $phpmailer ) {  
  4.     $phpmailer->FromName = ‘贝贝吧’; //发件人名称  
  5.     $phpmailer->Host = ‘smtp.qq.com’; //修改为你使用的邮箱SMTP服务器  
  6.     $phpmailer->Port = 465; //SMTP端口  
  7.     $phpmailer->Username = ‘[email protected]’; //邮箱账户  
  8.     $phpmailer->Password = ‘uahtavhbxvklcadh’; //邮箱密码  
  9.     $phpmailer->From = ‘[email protected]’; //邮箱账户  
  10.     $phpmailer->SMTPAuth = true;  
  11.     $phpmailer->SMTPSecure = ‘ssl’; //tls or ssl (port=25时->留空,465时->ssl)  
  12.     $phpmailer->IsSMTP();  
  13. }  

[/password]

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系贝贝进行处理。
本站默认解压密码:www.hibbba.com