I am trying to send email from my Codeigniter project. It worked on my localserver XAMP. But not working on online server.
showing this error...
A PHP Error was encountered Severity: Warning Message: fsockopen(): unable to connect to ssl://smtp.googlemail.com:465 (A socket operation was attempted to an unreachable network. ) Filename: libraries/Email.php Line Number: 1690
My email config file application/config/email.php is...
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$config['protocol']='smtp';
$config['smtp_host']='ssl://smtp.googlemail.com';
$config['smtp_port']='465';
$config['smtp_timeout']='30';
$config['smtp_user']='********@gmail.com';
$config['smtp_pass']='*******';
$config['charset']='utf-8';
$config['newline']="\r\n";
?>
Please, Help me. Advanced thanks.