2017-01-06 23 views
1

ホスト(https://www.namecheap.com)に電子メールを送信できません。私はこのエラーを取得していますCodeIgniter枠組みCodeIgniterとnamecaepを使用して電子メールを送信できません

$config = Array(
    'protocol' => 'HTTP',// also used smtp 
    'smtp_host' => 'mail.sss.com.ng', 
    'smtp_port' => 26, 
    'smtp_user' => '[email protected]', // change it to yours 
    'smtp_pass' => '3333333', // change it to yours 
    'mailtype' => 'html', 
    'charset' => 'iso-8859-1', 
    'wordwrap' => TRUE 
); 


    $this->load->library('email', $config); 
    $this->email->set_newline("\r\n"); 
     $this->email->from('[email protected]'); // change it to yours 
     $this->email->to($to);// change it to yours 
     $this->email->subject($subject); 
     $this->email->message('6666'); 
     if($this->email->send()) 
     { 
     echo 'Email sent.'; 
     } 
     else 
     { 
     show_error($this->email->print_debugger()); 
     } 

    } 

を使用:

error An Error Was Encountered

Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.

User-Agent: CodeIgniter

答えて

0

が、これは動作します設定の下に置きます。

$config['useragent']  = 'CodeIgniter'; 
$config['protocol']   = 'smtp'; 
$config['smtp_host']  = '*****'; 
$config['smtp_port']  = '**'; 
$config['smtp_user']  = '**'; 
$config['smtp_pass']  = '****'; 
$config['wordwrap']   = TRUE; 
$config['smtp_timeout']  = 5; 
$config['wrapchars']  = 76; 
$config['charset']   = 'utf-8'; 
$config['crlf']    = "\r\n"; 
$config['validate']   = FALSE; 
$config['mailtype']   = 'html'; 
$config['priority']   = '3'; 
$config['newline']   = "\r\n"; 

おかげ

関連する問題