CodeIgniter Forums
Multiple Email Errors - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Multiple Email Errors (/showthread.php?tid=29459)



Multiple Email Errors - El Forum - 04-10-2010

[eluser]Unknown[/eluser]
Hi all,

I have been trying to set up email to work with my website and have watched the tutorials at net.tutsplus and read around on the forums and have done all that has been recommended and it is still failing!

My code is

Code:
<?php

class Email extends Controller {

    function Email()
    {
        parent::Controller();  

    }

    function index()
    {
        $config = Array(
            'protocol' => 'smtp',
            'smtp_host' => 'ssl://smtp.googlemail.com',
            'smtp_port' => 465,
            'smtp_user' => '[email protected]',
            'smtp_pass' => '********',
            'mailtype'  => 'html',
            'charset'   => 'iso-8859-1'
        );
        
        $this->load->library('email', $config);
        $this->email->set_newline("\r\n");

        $this->email->from('[email protected]', 'Jemma Stones');
        $this->email->to('[email protected]');

        $this->email->subject('Email Test');
        $this->email->message('Testing the email class.');  

        $this->email->send();

        echo $this->email->print_debugger();
    }
}

And the errors I receive are:

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

- I then went into the PHP.ini and PHPforApache.ini files and removed the comment on extension=php_openssl.dll to no avail.

I also receive this error
Message: fwrite() expects parameter 1 to be resource, boolean given

I will be so grateful for any help, this is driving me nuts.

Thanks in advance!


Multiple Email Errors - El Forum - 04-10-2010

[eluser]InsiteFX[/eluser]
Hi

Never mind I see now that you did try it...

InsiteFX