[eluser]Unknown[/eluser]
this is the code:
Code:
<?php
class Email extends CI_Controller{
function Email()
{
parent::__construct();
}
function index(){
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => '***@***.com',
'smtp_pass' => '*****',
'mailtype' => 'html',
'charset' => 'iso-8859-1'
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from('***@***.com', '*****');
$this->email->to('***@***.com');
$this->email->subject('subject');
$this->email->message('message');
if($this->email->send())
{
echo 'your email was sent, fool';
}
else {
show_error($this->email->print_debugger());
}
}
}
and give this error:
Code:
A PHP Error was encountered
Severity: Warning
Message: 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?)
Filename: libraries/Email.php
Line Number: 1673
A PHP Error was encountered
Severity: Warning
Please help me.. :-S