无法发送AUTH LOGIN命令。错误:

时间:2015-02-06 11:12:34

标签: php codeigniter email yahoo

我使用codeigniter smtp邮件发送邮件,但我收到以下错误 遇到以下SMTP错误:无法发送AUTH LOGIN命令。错误: 遇到以下SMTP错误: 无法使用PHP SMTP发送电子邮件。您的服务器可能未配置为使用此方法发送邮件

   Following is my code
    $message = 'THIS IS A TEST MAIL';
     $ci = get_instance();
     $ci->load->library('email');
     $config['protocol'] = "smtp";
     $config['smtp_host'] = "smtp.mail.yahoo.com";
     $config['smtp_port'] = "465";
     $config['smtp_user'] = "contact@domain.com";
     $config['smtp_pass'] = "*********";
     $config['charset'] = "utf-8";
     $config['mailtype'] = "html";
     $config['crlf'] = '\r\n';
     $config['newline'] = '\r\n';
     $ci->email->initialize($config);
     $ci->email->from('contact@domain.com', 'domain name');
     $list = array('*******@gmail.com');
     $ci->email->to($list);
     $this->email->reply_to('contact@domain.com', 'Explendid Videos');
     $ci->email->subject('This is an email test');
     $ci->email->message($message);
     if ($ci->email->send()) {
        echo 'Your email was sent.';
     } else {
        show_error($ci->email->print_debugger());
     }

0 个答案:

没有答案