[password key=201752135435]
[code]functions.php[/code]文件加入以下代码:
- //使用smtp发送邮件(请根据自己使用的邮箱设置SMTP)
- add_action(‘phpmailer_init’, ‘mail_smtp’);
- function mail_smtp( $phpmailer ) {
- $phpmailer->FromName = ‘贝贝吧’; //发件人名称
- $phpmailer->Host = ‘smtp.qq.com’; //修改为你使用的邮箱SMTP服务器
- $phpmailer->Port = 465; //SMTP端口
- $phpmailer->Username = ‘[email protected]’; //邮箱账户
- $phpmailer->Password = ‘uahtavhbxvklcadh’; //邮箱密码
- $phpmailer->From = ‘[email protected]’; //邮箱账户
- $phpmailer->SMTPAuth = true;
- $phpmailer->SMTPSecure = ‘ssl’; //tls or ssl (port=25时->留空,465时->ssl)
- $phpmailer->IsSMTP();
- }
[/password]
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系贝贝进行处理。本站默认解压密码:www.hibbba.com


评论(0)