El Forum
04-13-2011, 05:37 AM
[eluser]talwinder[/eluser]
hi, i am trying to send the email using email class in codeigniter.
i am getting the following error:
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?)
this is the code below.
hi, i am trying to send the email using email class in codeigniter.
i am getting the following error:
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?)
this is the code below.
Code:
function email (){
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => '[email protected]',
'smtp_pass' => 'password'
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from('[email protected]');
$this->email->to('[email protected]');
$this->email->subject('this is a email test');
$this->email->message('this is the email iam trying to send from codeigniter');
if($this->email->send()){
echo 'you email was sent successfully';
}
else{
show_error($this->email->print_debugger());
}
}