【问题标题】:Failed to authenticate password. Error: 535-5.7.8 Username and Password not accepted [duplicate]验证密码失败。错误:535-5.7.8 用户名和密码不被接受 [重复]
【发布时间】:2017-11-29 09:29:22
【问题描述】:

我使用 CodeIgniter 发送邮件,但它返回此错误:

验证密码失败。错误:535-5.7.8 用户名和 密码不被接受

这是我的代码:

 $this->load->library('email');
        $config = Array(
            'protocol' => 'smtp',
            'smtp_host' => 'ssl://smtp.googlemail.com',
            'smtp_port' => 587,
            'smtp_user' => 'my@gmail.com',
            'smtp_pass' => 'mypass',
            'mailtype'  => 'html',
            'charset'   => 'iso-8859-1'
        );
        $this->load->library('email', $config);
        $this->email->from('my@gmail.com');
        $this->email->to('send@gmail.com');
        $this->email->subject('This the test');
        $this->email->message('this is the test message');
        if (!$this->email->send())
        {
            echo $this->email->print_debugger();

        }

我已经使用这个问题配置了我的 Xampp 服务器:How to configure XAMPP to send mail from localhost?

【问题讨论】:

  • 这是来自邮件服务器的响应。听起来您为该服务器使用了错误的用户名和密码。

标签: php codeigniter email xampp


【解决方案1】:

如果您使用的是 ssl,请将 smtp 端口更改为 465。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-05-22
    • 1970-01-01
    • 2021-08-05
    • 2023-03-22
    • 2022-08-12
    • 2020-03-29
    相关资源
    最近更新 更多