0
CodeIgniterの設定:PHPMailer SMTP connect()に失敗しました。解決する方法?
$config['useragent'] = 'PHPMailer'; // Mail engine switcher: 'CodeIgniter' or 'PHPMailer'
$config['protocol'] = 'smtp'; // 'mail', 'sendmail', or 'smtp'
$config['mailpath'] = '/usr/sbin/sendmail';
$config['smtp_host'] = 'smtp.gmail.com';
$config['smtp_user'] = '[email protected]';
$config['smtp_pass'] = '####';
$config['smtp_port'] = 465;
CodeIgniterのコントローラ:
$this->load->library('email');
$this->email->from('[email protected]', 'Webers Infotech');
$this->email->to('[email protected]','Rushabh Shah');
$this->email->subject('Your Subject');
$this->email->message('Your Message');
if (!$this->email->send()) {
show_error($this->email->print_debugger());
}
誰がどのように私はこの問題を解決することができますを教えていただけますか?それはなぜ機能しないのですか?
エラーは何ですか? –
サーバのDNSルックアップが壊れていると、SMTP接続に失敗することがあります。あなたはチェックしました – Deep
@DeepKakkarいいえ私はそれをチェックしていません。どうすれば確認できますか? –