yephyr 发表于 2020-08-09 11:18:39

最终还是连接上了163的SMTP,SMTP服务器的用户帐号不需要@163.com,修改function.php

    /**
     *
     *  发送邮件函数
     *
     */
    public function sendMail($mailto, $mailsub, $mailbd) {
        include(ROOT . "/pigeon/smtp.php");
        $smtpemailto = $mailto;
        $mailsubject = $mailsub;
        $mailbody    = $mailbd;
        $mailtype    = "HTML";
        $smtp        = new smtp($this->config['smtp']['host'], $this->config['smtp']['port'], true, $this->config['smtp']['user'], $this->config['smtp']['pass']);
        $smtp->debug = false;
        $smtp->sendmail($smtpemailto, $this->config['smtp']['email'], $mailsubject, $mailbody, $mailtype);
    }

把config['smtp']['user']改为config['smtp']['email'],这样config.php文件中就能区分user和email配置了

    'smtp' => Array(
        // 是否开启注册邮件验证
        'enable' => true,
        'host' => 'ssl://smtp.163.com',
        'port' => 465,
        'user' => 'myusername',
        'email' => 'myusername@163.com',
        'pass' => 'SMTP开通后生成的授权码',
        'name' => 'aname'
    ),

最终还是没能搭建完成自己的邮箱服务,有点遗憾

欢迎来到本站,请登陆。


输入一个时间来进行筛选

时间格式:2020-10-26 18:55:07


友情链接

Tsuna's Blog

ohyhello

格兰迪协会

Project Aurora

宅日记


© 2020 Akkariin's Blog | Powered by Pigeon (京ICP备15032199号-9)