0
someone would kindly help me, it’s a problem I’ve looked for here and haven’t found the mistake yet.
The problem is this, I am trying to send email on the server I am currently using where it is ssl and smtp, but it keeps giving the same error and I am not able to find the problem more than a week ago, the code in my controller is as follows:
$config['protocol'] = 'smtp';
$config['charset'] = 'UTF-8';
$config['smtp_host'] = 'smtp.XXXX';
$config['smtp_user'] = 'XXX';
$config['smtp_pass'] = 'XXXX';
$config['smtp_port'] = 587;
$config['smtp_keepalive'] = TRUE;
$config['smtp_crypto'] = 'ssl';
$this->email->initialize($config);
$this->email->from("[email protected]",'teste');
$this->email->to("[email protected]");
$this->email->subject("teste");
$this->email->message("teste");
$this->email->send();
echo $this->email->print_debugger();
and he’s making the following mistakes:
Message: fsockopen(): SSL Operation failed with code 1. Openssl Error messages: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:Unknown Protocol
Message: fsockopen(): Failed to enable Crypto
Message: fsockopen(): Unable to connect to ssl://smtp.XXX:587 (Unknown error)
I’m not getting anywhere, I already put the following code in php.ini:
extension=php_openssl.dll
however it did not work, using phpinfo and I realized that in the Registered Stream Socket Transports
has ssl,sslv3,tsl
among others but does not have sslv2 but I do not know if this influences, if this must be the mistake or what would be the problem.
I tried to use phpmailer but I couldn’t use it correctly, it says that the class is incorrect or something like that, so I don’t really know what to do.
phpmailer without the use of codeiginter is working with the settings, however in codeiginter I can not send using the same settings, someone could kindly help me, it is a little difficult to find something that helps in this part.
many thanks to all for the help.
Tried to enable the extension in php.ini? or Cpanel selector?
– Sr. André Baill
Yes, I enabled the extension, There is enabled in php.ini
– Gabriel Silva