2017-04-13 4 views
0

でssl_moduleを有効にします。はwampserver

私はlocalhostの& CodeIgniterのでGmailを使用してメールを送信してみてください、と私は、このエラーました:

Severity: Warning

Message: fsockopen(): php_network_getaddresses: getaddrinfo failed: No such host is known.

私のコード:

A PHP Error was encountered

Severity: Warning

Message: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

Filename: libraries/Email.php

Line Number: 2063

Backtrace:

File: D:\wamp64\www\TracerStudy\application\controllers\regis.php Line: 128 Function: send

File: D:\wamp64\www\TracerStudy\index.php Line: 315 Function: require_once

- 私はこのエラーを得た - 更新

$config = Array(
      'protocol' => 'smtp', 
      'smtp_host' => 'ssl://smtp.googlemail.com', 
      'smtp_port' => 465, 
      'smtp_user' => 'mymail', 
      'smtp_pass' => 'mypassword', 
      'mailtype' => 'html', 
      'charset' => 'iso-8859-1', 
      'smtp_crypto' => 'ssl', 
      'wordwrap' => TRUE 
     ); 

     $this->load->library('email', $config); 
     $this->email->set_newline("\r\n"); 
     $this->email->from('myemail'); 
     $this->email->to('sendemail'); 
     $this->email->subject('subject'); 
     $this->email->message('message'); 
     if($this->email->send()) 
     { 
      echo 'Email sent.'; 
     } 
     else 
     { 
      show_error($this->email->print_debugger()); 
     } 

答えて

0

私の問題を解決しました。

関連する問題