i m trying to send email It properly working on localhost when i live it on server it give me warning i m using codeigniter here is the code
public function send_me($from,$name,$toEmail,$subject,$msg){
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => 'xxxxxxxxxxx',//user name herer
'smtp_pass' => 'xxxxxxxx', //password hre
'mailtype' => 'html',
'charset' => 'iso-8859-1',
'wordwrap' => TRUE
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from($from,$name);
$this->email->to($toEmail);//to address here
$this->email->subject($subject);
$this->email->message($msg);
if($this->email->send())
return true;
else
return false;
}
and warning are
A PHP Error was encountered
Severity: Warning
Message: fsockopen() [function.fsockopen]: unable to connect to ssl://smtp.googlemail.com:465 (Connection timed out)
Filename: libraries/Email.php
Line Number: 1689 A PHP Error was encountered
Severity: Warning
Message: fwrite() expects parameter 1 to be resource, boolean given
Filename: libraries/Email.php
Line Number: 1846