CodeIgniterのeメールクラスを使用してメールを送信しようとしましたが、いくつかのエラーが表示されます。
fsockopen() [function.fsockopen]: unable to connect to
ssl://smtp.googlemail.com:465 (Unable to find the socket transport
"ssl" - did you forget to enable it when you configured PHP?)
私のコードはここにあります:
$config['protocol'] = 'smtp';
$config['smtp_host'] = 'ssl://smtp.googlemail.com';
$config['smtp_port'] = 465;
$config['smtp_user'] = 'myemail.world2010@gmail.com';
$config['smtp_pass'] = 'email';
$this->load->library('email');
$this->email->initialize($config);
$this->email->set_newline("\r\n");
$message="
username:{$this->input->post('username')}
password:{$this->input->post('password')}
";
$this->email->from('sagar.world2010@gmail.com','Admin');
$this->email->to($this->input->post('email'));
$this->email->subject('Activation Message');
$this->email->message($message);
$this->email->send();
echo $this->email->print_debugger();
また、php.iniファイルを変更して貼り付けextension=php_openssl.dll
ましたが、それでも機能しません。