no puedo enviar correo electronico

I tried to send mail using the email class of CodeIgniter, but it is showing some errors:

fsockopen() [function.fsockopen]: unable to connect to
ssl:// (Unable to find the socket transport
"ssl" - did you forget to enable it when you configured PHP?)

Mi codigo esta aqui:

        $config['protocol'] = 'smtp';
        $config['smtp_host'] = 'ssl://';
        $config['smtp_port'] = 465;
        $config['smtp_user'] = '';
        $config['smtp_pass'] = 'email';

       $this->email->subject('Activation Message');
       echo $this->email->print_debugger();

I also changed the php.ini file and pasted extension=php_openssl.dll in it, but it still does not work.

preguntado el 03 de julio de 12 a las 20:07

Does a phpinfo() show that fsockopen is enabled? -

I take it that you're running this through a web application, rather than at the command line? (Make sure you've amended the right php.ini file - there is often one for each of the above environments). -

1 Respuestas

The smtp server from gmail is

so your configuration should be:

$config['protocol'] = 'smtp';  
$config['smtp_host'] = 'ssl://';  
$config['smtp_port'] = 465;  
$config['smtp_user'] = '';
$config['smtp_pass'] = 'email';

but I'm not sure if smtp_host need the 'ssl://' part

Respondido 03 Jul 12, 21:07

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.