Email Library Config File

#1
[eluser]Neeraj Kumar[/eluser]
Hi all,

Lately I have been fiddling around with CI's email class ...

I have encountered a strange problem. When I try to add configuration details to Email.php config file then CI is not sending any emails and script hangs and just keeps on loading in browser.

But instead when I load config details directly by passing $config array to $this->email->inilialize then it works..

What could be the problem? I habve tried renaming file to Capital 'E' and all the other stuff i could find in the forums. please help. this thing is really annoying.

#2
[eluser]Neeraj Kumar[/eluser]
anyone?

#3
[eluser]WanWizard[/eluser]
If you look in the email library, you will find this constructor:
Code:
function CI_Email($config = array())
{
    if (count($config) > 0)
    {
        $this->initialize($config);
    }
    else
    {
        $this->_smtp_auth = ($this->smtp_user == '' AND $this->smtp_pass == '') ? FALSE : TRUE;
        $this->_safe_mode = ((boolean)@ini_get("safe_mode") === FALSE) ? FALSE : TRUE;
    }
    log_message('debug', "Email Class Initialized");
}
Which means that it calls the same initialize method() that you're calling yourself. Which in turn means your problem is elsewhere.

Check after you've loaded the email class if the variables you have defined in your config file are really set by the email library. If not, there may be an issue with your config file.

#4
[eluser]Neeraj Kumar[/eluser]
alright, let me check..


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.