I am running codeigniter3.03 for digital ocean nginx and php 7. When I try to send an email, I get this error:
the code:
Severity: warning Message: fsockopen (): cannot connect to ssl: //smtp.googlemail.com: 465 (connection timeout) File name: libraries / Email.php Line number: 1986
My email setup
$config['useragent'] = 'CodeIgniter'; $config['protocol'] = 'smtp'; //$config['mailpath'] = '/usr/sbin/sendmail'; $config['smtp_host'] = 'ssl://smtp.googlemail.com'; $config['smtp_user'] = 'xxxxxx@gmail.com'; $config['smtp_pass'] = 'xxxxxxxxxxxx'; $config['smtp_port'] = 465; $config['smtp_timeout'] = 5; $config['wordwrap'] = TRUE; $config['wrapchars'] = 76; $config['mailtype'] = 'html'; $config['charset'] = 'utf-8'; $config['validate'] = FALSE; $config['priority'] = 3; $config['crlf'] = "\r\n"; $config['newline'] = "\r\n"; $config['bcc_batch_mode'] = FALSE; $config['bcc_batch_size'] = 200;
This version works flawlessly in the same configuration in php 5.x.
in php.ini i have
extension=php_openssl.dll
included.
I could not understand why this should not work in php7. Can someone give me a hint what to check or what could be causing this error.
php nginx codeigniter-3
elf
source share