Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/258.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 无法发送AUTH LOGIN命令。错误:_Php_Codeigniter_Email_Yahoo - Fatal编程技术网

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

Php 无法发送AUTH LOGIN命令。错误:,php,codeigniter,email,yahoo,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');

我使用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());
     }

我没有得到你?你能解释一下我需要在哪里运行这条命令吗?按照这里的建议构建你的配置:@AdrienXL工作得很好……非常感谢你的回答……几周来一直在苦苦挣扎