Welcome Guest, Not a member yet? Register   Sign In
No Error, but also no any thing!! E-mailing seems impossible! Any suggestions?
#1

[eluser]ad0mw[/eluser]
Hi Guys,

I have researched this problem all over and can only ever find the same suggested solution to this problem code of mine after following the codeIgniter From Scratch Day 3 - email tutorial.

I get no debugger errors but I also don't get anything appearing at all in safari and in chrome i only get the error:
Quote:The website encountered an error while retrieving http://localhost/ci/index.php/email/. It may be down for maintenance or configured incorrectly.


Code:
<?php


class Email extends CI_Controller
{

    function __construct()
    {
        parent::Controller();
    }
    
    function index()
    {
        $config = Array(
            'protocol' => 'smtp',
            'smtp_host' => 'ssl://smtp.gmail.com',
            'smtp_port' => 465,
            'smtp_user' => '********@gmail.com',
            'smtp_pass' => '********'
        );
            
        $this->load->library('email', $config);
        
        $this->email->set_newline("\r\n");
        
        $this->email->from('******@gmail.com');
        $this->email->to('*******@gmail.com');
        $this->email->subject('this is an email test');
        $this->email->message('Test email biatch');
        
        if($this->email->send())
        {
            echo 'Mail sent';
        }
        
        else
        {
            show_error($this->email->print_debugger());
        }
    }
    
}


for this line [code]'smtp_host' => 'ssl://smtp.gmail.com',] ive used: ssl://, sslv2:// and https:// (non of which solved my problem)

I then did further research and some people had a problem with enabling 'php_openssl' by uncommenting the line in php.ini
;extension=php_openssl.dll


when I go into my application > mamp > conf > php5.2 (and/or php5.3) >
php.ini and try find the line to edit it does not exist, nor have I been able to find a solution to rectify it being there.

I'm lost for answers and have given in to posting


This also being my first on CI forms and im sure only 1 of many to come!

Thank you!


Messages In This Thread
No Error, but also no any thing!! E-mailing seems impossible! Any suggestions? - by El Forum - 04-06-2011, 09:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB